admin管理员组文章数量:1201362
I'm working on a Spring Boot application and trying to integrate Swagger UI using the springdoc-openapi-ui dependency. Here's my setup:
Spring Boot version: 2.x.x / 3.x.x (3.4.1) springdoc-openapi-ui version: 1.7.0
I added the following dependency to my pom.xml:
xml
org.springdoc
springdoc-openapi-ui
3.4.1
I also set up the following configurations in my application.properties:
properties
springdoc.api-docs.path=/v3/api-docs
springdoc.swagger-ui.path=/swagger-ui.html
However, when I run my application and try to access Swagger UI at http://localhost:8080/swagger-ui.html, it does not load properly. Either:
I get a 404 error. The page loads but shows a blank UI. It doesn't reflect my API endpoints. Here’s what I’ve tried so far:
Verified that the application is running without errors. Checked if "/v3/api-docs" is not accessible Cleared browser cache and used incognito mode. Rebuilt the project to ensure dependencies are correctly imported.
I'm working on a Spring Boot application and trying to integrate Swagger UI using the springdoc-openapi-ui dependency. Here's my setup:
Spring Boot version: 2.x.x / 3.x.x (3.4.1) springdoc-openapi-ui version: 1.7.0
I added the following dependency to my pom.xml:
xml
org.springdoc
springdoc-openapi-ui
3.4.1
I also set up the following configurations in my application.properties:
properties
springdoc.api-docs.path=/v3/api-docs
springdoc.swagger-ui.path=/swagger-ui.html
However, when I run my application and try to access Swagger UI at http://localhost:8080/swagger-ui.html, it does not load properly. Either:
I get a 404 error. The page loads but shows a blank UI. It doesn't reflect my API endpoints. Here’s what I’ve tried so far:
Verified that the application is running without errors. Checked if "/v3/api-docs" is not accessible Cleared browser cache and used incognito mode. Rebuilt the project to ensure dependencies are correctly imported.
Share Improve this question asked Jan 22 at 13:34 GURU RAJGURU RAJ 11 Answer
Reset to default 0Use the version 2.7.0-RC1 it worked for me, 2.8.3 and 2.7.0 are not. I don't know why:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.7.0-RC1</version>
</dependency>
本文标签:
版权声明:本文标题:Why swagger is not working properly with the springdoc-openapi-ui dependency in my spring boot application with the version 3.4. 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738560151a2099074.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论