Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Spring boot 3 doesn't work with springfox 3.0

I’ve been trying to integrate swagger with spring boot. I used spring boot version 3.0.4 with springfox 3.0

Here’s my pom.xml file springfox dependency and parent

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.0.4</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>
    <version>3.0.0</version>
</dependency>

SpringfoxConfig.java

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel


@Configuration
public class SpringFoxConfig {
    @Bean
    public Docket api() {
        return new Docket(DocumentationType.SWAGGER_2)
                .select()
                .apis(RequestHandlerSelectors.any())
                .paths(PathSelectors.any())
                .build();
    }
}

When I run the application and tried the url http://localhost:8080/swagger-ui/ I can’t see the swagger ui instead I’m seeing white label error.

I migrated spring-parent to 2.7.9 and enabled the swagger with @EnableSwagger. I can see the swagger now.

I’ve used the reference document from springfox. Not sure, what’s the issue with new version and how can be rectified.

>Solution :

I am sorry that as of today , springfox does not support Spring Boot 3 yet.(see this and this).

You can consider to use another similar project called springdoc and here is the migration guideline for migrating springfox to springdoc

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading