Springboot启动报错:Failed to start bean ‘documentationPluginsBootstrapper‘

在使用SpringBoot2.7时,由于与Swagger2的版本不兼容引发的ApplicationContextException,解决方法是在application.yml中配置spring.mvc.pathmatch.matching-strategy:ant_path_matcher

javascript 复制代码
org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException

报错原因:springboot 2.7和swagger2版本有冲突

解决方法:在application.yml添加如下配置:

yaml 复制代码
spring: 
     mvc:
        pathmatch:
          matching-strategy: ant_path_matcher
相关推荐
Rsun045517 分钟前
IDEA隐藏无关文件
java·elasticsearch·intellij-idea
人道领域17 分钟前
【黑马点评日记03】实战:Redis缓存穿透,缓存击穿,缓存雪崩全解析
java·开发语言·jvm·redis·spring·tomcat
SamDeepThinking19 分钟前
Spring AOP记录日志,生产环境的代码长什么样
java·后端·架构
阿拉金alakin26 分钟前
深入理解 Java 线程池:核心参数、工作流程与常用创建方式
java·开发语言·java-ee
小江的记录本33 分钟前
【网络安全】《网络安全三大加密算法结构化知识体系》
java·前端·后端·python·安全·spring·web安全
GetcharZp35 分钟前
「干掉 Gin?」极致性能的 Go Web 框架 Fiber:这才是真正的“快”!
后端
希望永不加班42 分钟前
SpringBoot 中 AOP 实现多数据源切换
java·数据库·spring boot·后端·spring
广师大-Wzx1 小时前
JavaWeb:前端部分
java·前端·javascript·css·vue.js·前端框架·html
生万千欢喜心1 小时前
Linux 安装金蝶天燕中间件 AAS-V9.0.zip
java·linux
海兰1 小时前
【第2篇-续】从零开始helloworld使用openAI通用模型的完整实现示例附源代码
java·人工智能·spring boot·alibaba·spring ai