Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run with spring boot 3.0.0-snapshot? #3983

Open
guwan opened this issue Mar 6, 2022 · 14 comments
Open

How to run with spring boot 3.0.0-snapshot? #3983

guwan opened this issue Mar 6, 2022 · 14 comments

Comments

@guwan
Copy link

guwan commented Mar 6, 2022

How to run with spring boot 3.0.0-snapshot? Now I use

springfox-swagger2:3.0.0 and springfox-swagger-ui:3.0.0, which are reported

Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest

This is wrong, because it should be jakarta.servlet.http.HttpServletRequest

@TyinOne
Copy link

TyinOne commented Apr 19, 2022

How to?

2 similar comments
@wangqinggo
Copy link

How to?

@1171736840
Copy link

How to?

@CanvaChen
Copy link

We can migrate to springdoc. This library also supports OpenAPI 3 and Swagger UI. @guwan @wangqinggo @1171736840 @TyinOne

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.0.0-M3</version>
</dependency>
/**
 * 接口文档配置
 *
 * @author Canva
 */
@Configuration
public class SpringDocConfig {
    @Bean
    public OpenAPI apiInfo() {
        return new OpenAPI().info(new Info().title("后端接口文档").version("1.0.0"));
    }

    @Bean
    public GroupedOpenApi httpApi() {
        return GroupedOpenApi.builder()
                .group("http")
                .pathsToMatch("/**")
                .build();
    }
}

@TyinOne
Copy link

TyinOne commented Oct 10, 2022

@CanvaChen springdoc啥都好 就是注解不习惯

@strazdinsg
Copy link

Springfox does not work with Spring Boot 3.0.x.

The same issue is duplicated in #4041 and #4049 .

@myheavyhead
Copy link

Swagger will support springboot 3.0.x in the future?

@strazdinsg
Copy link

@flower-worm It is not Swagger that is the problem. The problem is in SpringFox, which is implementation of Swagger UI. You can use Spring Doc - another implementation of the same Open API documentation and Swagger UI.

@myheavyhead
Copy link

myheavyhead commented Mar 4, 2023

@strazdinsg Thank you. The problem is in SpringFox, when i upgrade the boot version to 3.0.x, there are some exception appear. I wish i can just revise the version to solve the problem, but i think it's a time to learn spring Doc.

@stale
Copy link

stale bot commented Jun 10, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 10, 2023
@msakthi1985
Copy link

msakthi1985 commented Jul 4, 2023

Hi Team,
I am using latest springdoc-openapi-ui - 1.7.0 with springboot -3.1.0 and Java 17 but swagger url doesn't work for me, I am facing "This [hostname] page can't be found" issue while accessing the swagger url.
Tried swagger-ui.html and swagger-ui/index.html same issue exists on both the urls.

Any help is much appreciated.

FYI:
My project is starting and restful APIs are working fine but swagger url alone won't work.

Thanks,
Sakthi.

@stale stale bot removed the wontfix label Jul 4, 2023
@msakthi1985
Copy link

Hi Team,
It is working now, we have to use springdoc-openapi-ui-starter-webmvc-ui alone to define in pom.xml to make swagger url work.
Previously I used to define springdoc-openapi-ui and springdoc-openapi-ui-starter-webmvc-ui both the dependencies in my pom.xml so swagger url doesn't worked for me.

Hope this solution will help if anyone face the similar issue.

Thanks,
Sakthi.

@roufaouissantos
Copy link

Salut l'équipe, j'utilise le dernier springdoc-openapi-ui - 1.7.0 avec springboot -3.1.0 et Java 17 mais l'URL swagger ne fonctionne pas pour moi, je suis confronté à "Cette page [nom d'hôte] est introuvable" problème lors de l’accès à l’URL swagger. J'ai essayé swagger-ui.html et swagger-ui/index.html, le même problème existe sur les deux URL.

Toute aide est très appréciée.

Pour information : mon projet démarre et les API reposantes fonctionnent correctement, mais l'URL swagger seule ne fonctionnera pas.

Merci, Shakthi.

verify your context path and reload your application

@Pathum-lakshan
Copy link

use this

org.springdoc springdoc-openapi-starter-webmvc-ui 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants