Forum Discussion

rajputatvit's avatar
rajputatvit
New Contributor
5 years ago

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.

 

2 Replies

  • Springfox is not one of our projects, and we do not maintain it nor the Swagger UI maven jar they provide. As such, it's difficult for us to provide assistance with it. Please file a ticket with Springfox directly.

    • rajputatvit's avatar
      rajputatvit
      New Contributor

      Thanks a lot, I will contact springfox for this.