Skip to content

SpringDoc 3.0.2 HATEOAS incompatible with Spring Boot 4 (HateoasProperties missing) #3238

Closed

Description

@bruderj15

Describe the bug

After migrating a Spring Boot project from 3.x to 4.x, our application fails to start when using SpringDoc 3.0.2 with HATEOAS enabled.

The exception is:

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.hateoas.autoconfigure.HateoasProperties

This happens because Spring Boot 4 removed HateoasProperties, but SpringDoc 3.0.2 still references it in SpringDocHateoasConfiguration. This makes it impossible to use SpringDoc 3.0.2 with HATEOAS on Spring Boot 4.


To Reproduce

Steps to reproduce the behavior:

  1. Start with a Spring Boot 3 project using springdoc-openapi-starter-webmvc-ui:3.0.2 and HATEOAS enabled.
  2. Upgrade the project to Spring Boot 4.
  3. Run the application.
  4. The application fails with the ClassNotFoundException for HateoasProperties.

Versions:

  • Spring Boot: 4.0.x
  • SpringDoc OpenAPI: 3.0.2
  • Modules: springdoc-openapi-starter-webmvc-ui with HATEOAS

Sample controller (optional minimal setup)

@RestController
@RequestMapping("/api")
public class HelloController {

    @GetMapping("/hello")
    public String hello() {
        return "Hello World";
    }
}

Expected behavior
The application should start successfully.
HATEOAS and SpringDoc integration should work on Spring Boot 4.
OpenAPI documentation (JSON or YAML) should be generated as before.

Screenshots
N/A

Additional context
HATEOAS support is required for our project. Removing HATEOAS modules is not an option.
The error occurs during bean creation of modelConverterRegistrar → collectionModelContentConverter → hateoasHalProvider.
This is a breaking incompatibility between SpringDoc 3.x and Spring Boot 4.

Current workaround
Adding empty class org.springframework.boot.hateoas.autoconfigure.HateoasProperties manually.

Activity

  1. mschout commented on Mar 3, 2026

    @mschout
    Contributor

    Hm, are you sure you have the right stuff on the classpath? HateoasProperties does exist in Spring Boot 4.0.3.

    You need to have org.springframework.boot:spring-boot-hateoas:4.0.3 on the classpath.

    Image
  2. mschout commented on Mar 3, 2026

    @mschout
    Contributor

    side note that this is needed in addition to spring-boot-starter-hateoas. Spring Boot 4.x is more modular so you will need to adjust your dependencies when migrating.

  3. bruderj15 commented on Mar 4, 2026

    @bruderj15
    Author

    Thanks for the quick response.

    I can't get it working right away but certainly have just an auto-configure issue on my side.

  4. added a commit that references this issue on Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions