Swagger UI doesn't show up for springfox 3.0.0 in Springboot application
See original GitHub issueI am using Spring boot 2.3.1.RELEASE. My code snippets of SpringFox configuration and main application class are as below:
@Configuration
@EnableWebMvc
public class SpringFoxConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.abc.controllers"))
.paths(PathSelectors.any())
.build();
}
}
@SpringBootApplication
@EnableConfigurationProperties
@PropertySource("classpath:application.properties")
@EnableOpenApi
public class ABCServiceApplication {
public static void main(String[] args) {
Installation.init( ABCServiceApplication.class );
SpringApplication.run(ABCServiceApplication.class, args);
}
}
Dependency added in build.gradle : “io.springfox:springfox-boot-starter:3.0.0”
I run this application via terminal using following command: java -jar build/libs/abc-application.jar
I can see http://localhost:8080/v3/api-docs working, but swagger ui is not working. Tried accessing http://localhost:8080/swagger-ui/index.html but shows 404. I have tried all possible urls which I saw in documentation and few other sites.
Can someone please help me out here?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9
Top Results From Across the Web
Springfox swagger-ui 3.0.0 does not bring up ... - Stack Overflow
1. add springfox-boot-starter to POM , remove old dependencies from POM: springfox-swagger2 and springfox-swagger-ui · 2. Remove the @ ...
Read more >Setting up Swagger 3 With Spring Boot - Medium
So let's jump right in to the simple steps: Adding dependencies. Add the 3rd version springfox-boot-starter and springfox-swagger-ui to pom.xml ...
Read more >Setting Up Swagger 2 with a Spring REST API - Baeldung
In this tutorial, we'll look at Swagger 2 for a Spring REST web service, using the Springfox implementation of the Swagger 2 specification....
Read more >Springfox Reference Documentation - GitHub Pages
Spring Boot Applications. Remove library inclusions of earlier releases. Specifically remove springfox-swagger2 and springfox-swagger-ui ...
Read more >failed to start bean 'documentationpluginsbootstrapper ...
I got same issue using springfox-swagger2 and springfox-swagger-ui version(3.0.0), spring-boot version(2.6.2). The way to resolve this issue is by adding ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you can add this into your swaggerconfig
then you can access http://localhost:8080/swagger-ui/index.html
@pradeep-017 please try http://localhost:8080/swagger-ui/ See changes in documentation https://springfox.github.io/springfox/docs/current/#changes-in-swagger-ui