rajputatvit
6 years agoNew Contributor
How to enable Swagger UI for spring boot app using maven dependency without swagger config docket
controller.java
@RestController
public class hello_world_controller {
@RequestMapping("/")
String home()
{
return "hello world";
}
}
In POM.xml, I have added below dependecy
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
When I am hitting localhost:8080/, getting response hellow world
But when I am hitting localhost:8080/swagger-ui.html, it's not working
I am novice in swagger, please guide me how to do that if it possible.