Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
33 views
in Technique[技术] by (71.8m points)

spring boot - Swagger UI redirecting to /swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config

I am using springdoc-openapi-ui, when I hit http://localhost:8080/swagger-ui.html URL it is always redirecting to http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config. Is there any way to stop this redirect and load swagger on http://localhost:8080/swagger-ui.html instead.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have asked the same question on Github site regarding the same. Link is provided below
https://github.com/springdoc/springdoc-openapi/issues/742#issue-642810354
Got the reply from one of the contributor

springdoc-openapi uses an internal redirect to resolve the necessary swagger resources. This the way the library is built.
You use you own version of swagger-ui, so you can add your custom Logic, without having to rely on springdoc-openapi-ui.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...