Added Springfox Swagger-UI and it's not working, what am I missing?
I tried most of these answers and the final solution was creeping..
The right URL is the following
http://localhost:8080/swagger-ui/
I'm using Springfox swagger-ui 3.x.x
Refer for complete swagger setup:http://muralitechblog.com/swagger-rest-api-dcoumentation-for-spring-boot/
io.springfox >= 2.X | io.springfox >= 3.X |
---|---|
|
|
browser URL http://localhost:8080/swagger-ui.html | browser URL http://localhost:8080/swagger-ui/#/ |
Must Need
| Must Need
|
|
|
Already a lot of answers have stated the right answer but still, there has been some confusion regarding the error.
If you are using Spring Boot Version >= 2.2, it is recommended to use SpringFox Swagger version 3.0.0
Now, only a single dependency is required to be added in the pom.xml.
<!-- Swagger dependency --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-boot-starter</artifactId> <version>3.0.0</version> </dependency>
Once the application is started, you can get the documentation by hitting either of the new swagger URLs.
Option 1:http://localhost:8080/swagger-ui/
Option 2:http://localhost:8080/swagger-ui/index.html