SpringBoot3(3.0.6)与 springfox 3.0.0 不兼容。
错误描述
java.lang.TypeNotPresentException:
Type javax.servlet.http.HttpServletRequest not present
Caused by: java.lang.ClassNotFoundException:
javax.servlet.http.HttpServletRequest
Failed to start bean 'documentationPluginsBootstrapper'
解决方法
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
and application.properties
spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER
在SpringBoot3.0.6版本中,出现了与springfox3.0.0的兼容问题,具体表现为java.lang.TypeNotPresentException,缺失javax.servlet.http.HttpServletRequest类。为解决此问题,需要引入javax.servlet-api的依赖,并在application.properties中设置spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER。

21万+

被折叠的 条评论
为什么被折叠?



