Springfox: /v2/api-docs gives 404 error

Created on 9 Jan 2018  路  1Comment  路  Source: springfox/springfox

I am integrating springfox with my springboot application. I have completed the required steps.
Bean is configured as interpreted from the logs:

2018-01-09 12:40:26.381 IST INFO rid=NA 17584 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/ui]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.UiConfiguration> springfox.documentation.swagger.web.ApiResourceController.uiConfiguration() 2018-01-09 12:40:26.383 IST INFO rid=NA 17584 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources/configuration/security]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.SecurityConfiguration> springfox.documentation.swagger.web.ApiResourceController.securityConfiguration() 2018-01-09 12:40:26.384 IST INFO rid=NA 17584 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/swagger-resources]}" onto public org.springframework.http.ResponseEntity<java.util.List<springfox.documentation.swagger.web.SwaggerResource>> springfox.documentation.swagger.web.ApiResourceController.swaggerResources() 2018-01-09 12:40:26.392 IST INFO rid=NA 17584 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2018-01-09 12:40:26.393 IST INFO rid=NA 17584 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2018-01-09 12:40:26.720 IST INFO rid=NA 17584 --- [ main] pertySourcedRequestMappingHandlerMapping : Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] 2018-01-09 12:40:26.988 IST INFO rid=NA 17584 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@27f981c6: startup date [Tue Jan 09 12:39:56 IST 2018]; root of context hierarchy
But when I try to access http://localhost:8080/v2/api-docs
It is giving 404 Not Found. Can someone please look into it ?

question

>All comments

Wish these 404 swagger tickets would not just be closed without explanation. There are far too many people suffering with these errors

Was this page helpful?
0 / 5 - 0 ratings