swagger ui not working for swagger version 2

1.5k views Asked by At

I am currently working on a project involving spring-boot and swagger. I have upgraded my maven spring boot project to the latest Swagger using the link Upgrade to version2. I am currently using the Swagger-UI which I have configured from the link Swagger-UI with Spring Boot

I try to access the url : localhost:8080/swagger/index.html after deploying the app successfully on my tomcat server. Unfortunately, it does not work and I am unable to view the swagger-ui in my browser. How do I go on about it further?

1

There are 1 answers

0
Dilip Krishnan On

I think you're mixing the documentation of 2 versions of the library. The second link points to an older version of the springfox library. Please follow the instructions in the latest snapshot of the documentation. If you've configured everything correctly you should see the swagger-ui at http://localhost:8080[/CONTEXT-PATH]/swagger-ui.html. Depending on how you've set your springboot app the context path is optional.