前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >spring3 springfox报错Type javax.servlet.http.HttpServletRequest not present

spring3 springfox报错Type javax.servlet.http.HttpServletRequest not present

作者头像
阿超
发布2023-10-23 09:44:12
1.2K0
发布2023-10-23 09:44:12
举报
文章被收录于专栏:快乐阿超

相信一切,失望有日;怀疑一切,收获天明。——乔·赫伯特

就像这个issue里描述的一样:

https://github.com/springfox/springfox/issues/4061

springboot3.0引入:

代码语言:javascript
复制
            <dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-boot-starter</artifactId>
    <version>3.0.0</version>
</dependency>

引入完毕后发现启动报错。。。于是查询了下

最后一次更新是三年前。。。

https://central.sonatype.com/artifact/io.springfox/springfox-boot-starter/versions

相对的springboot3是去年出的

https://central.sonatype.com/artifact/org.springframework.boot/spring-boot/versions

那咱们应该怎么集成swagger呢?用:

https://springdoc.org/

代码语言:javascript
复制
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
    <version>2.2.0</version>
</dependency>
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2023-10-20,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档