Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot 3.0.0 and Springdoc incompatible?

I have a barebones SpringBoot project, with the latest Springdoc dependency (as of this writing) in the pom file:

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>
    <version>1.6.13</version>
</dependency>

In addition I only have the web starter dependency:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

It works fine with Spring Boot 2.7.5. On local machine, I can go to http://localhost:8080/swagger-ui.html and http://localhost:8080/v3/api-docs and be redirected to the OpenAPI resources. However, once I change Spring Boot version to 3.0.0 and restart the application, I only get 404 NOT FOUND on the above two resources.

Has anyone found a way to make this work with Spring Boot 3.0.0?

like image 503
Stan Ostrovskii Avatar asked Sep 21 '25 12:09

Stan Ostrovskii


1 Answers

You must use SpringDoc 2

https://springdoc.org/v2/

<dependency>
  <groupId>org.springdoc</groupId>
  <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
  <version>2.0.0</version>
</dependency>
like image 68
Simon Martinelli Avatar answered Sep 23 '25 02:09

Simon Martinelli