question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swagger UI does not work after passing from 2.9.2 to 3.0.0

See original GitHub issue

After upgrading the version to the latest (3.0.0) I receive a 404 when I try to access to http://localhost:8080/swagger-ui.html.

My config details are:

// Spring boot gradle plugin
id 'org.springframework.boot' version '2.3.1.RELEASE'

// Swagger deps
implementation('io.springfox:springfox-swagger2:3.0.0')
implementation('io.springfox:springfox-swagger-ui:3.0.0')
@Configuration
@EnableSwagger2
public class AppConfig {
    @Bean
    public Docket apiDocket() {
        return new Docket(DocumentationType.SWAGGER_2)
            .select()
            .apis(RequestHandlerSelectors.any())
            .paths(PathSelectors.any())
            .build();
    }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
dilipkrishcommented, Jul 23, 2020

If you tried the two methods, then you should’ve seen the swagger-ui @ http://localhost:8080/swagger-ui/index.html and not the url you mentioned in the issue.

3reactions
pbarsotti-glovocommented, Jul 23, 2020

Ohh, that’s the problem! I was using an old bookmarked url… Sorry to bother you with such a stupid thing and thanks for your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Springfox swagger-ui 3.0.0 does not bring up ... - Stack Overflow
OpenAPI is top on swagger, so if you are using Spring boot, the OpenAPI configuration is much simpler than Springfox.
Read more >
springfox/springfox - Gitter
I'm using Springfox / Swagger / Spring Boot, and trying to figure out how to make the Swagger UI use https. In Spring...
Read more >
Setting Up Swagger 2 with a Spring REST API - Baeldung
Learn how to document a Spring REST API using Swagger 2. ... The problem is, of course, when things fall apart in production...
Read more >
Springfox Reference Documentation - GitHub Pages
In this scenario, Springfox will not correctly generate and expose the Swagger UI endpoint ( /swagger-ui.html ) if @EnableWebMvc is present in ...
Read more >
[Solved]-Added Springfox Swagger-UI and it's not working ...
I ran into this issue because I had endpoints with request mappings that had path variables of this form: /{var}. Turns out that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found