cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable Swagger UI for spring boot app using maven dependency without swagger config docket

New 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.

 

2 REPLIES 2
Moderator

Re: How to enable Swagger UI for spring boot app using maven dependency without swagger config docke

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.

New Contributor

Re: How to enable Swagger UI for spring boot app using maven dependency without swagger config docke

Thanks a lot, I will contact springfox for this.

New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors