How to change Swagger SpringMVC UI URL

I use swagger-springmvc in the spring-boot project and everything works fine, but when I add the swagger-spring -mvc-ui dependency to my project, swagger-u overloads my query matching for the base url, I am pretty shure there way to specify the UI to another url. Does anyone know how to change the default path for swagger-ui?

+5
source share
1 answer

You are using the old version 0.8.8, which is from com.mangofactory

I recommend you use version 2.3.1 from io.springfox

Note. If you follow the guide, you can access swagger without having to manually download the Swagger-UI.

http://localhost:8080/your-app-root/swagger-ui.html 

Document URL is now available

 http://localhost:8080/your-app-root/v2/api-docs 

You can change the document URL by specifying the source of the property in the appication.properties file using

 springfox.documentation.swagger.v2.path 

change link

spring boot demo

textbook

+2
source

All Articles