Which version of Springdoc (springdoc-openapi
) is compatible with Spring Boot 3.2.8?
I’m unable to open Swagger UI via localhost.
I have a project that runs on Spring Boot 3.2.8 and cannot downgrade to the version below that.
The dependency which I’m using in pom.xml is springdoc-openapi-ui
version 1.7.0.
Neeti Kulkarni is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3
Simple answer: springdoc-openapi
(swagger) version 2.x will only support for Spring Boot 3.x.
Just add these dependencies given below if it’s a Maven project:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.6.0</version>
</dependency>
Add this line in application.properties:
springdoc.swagger-ui.path=/swagger-ui.html
It will work.
Output:
Read the V1 docs & V2 docs. It’s mentioned properly.