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
相关推荐
brzhang几秒前
代码即图表:dbdiagram.io让数据库建模变得简单高效
前端·后端·架构
Jamesvalley5 分钟前
【Django】新增字段后兼容旧接口 This field is required
后端·python·django
MaCa .BaKa9 分钟前
35-疫苗预约管理系统(微服务)
spring boot·redis·微服务·云原生·架构·springcloud
triticale9 分钟前
【蓝桥杯】P12165 [蓝桥杯 2025 省 C/Java A] 最短距离
java·蓝桥杯
Felven9 分钟前
A. Ideal Generator
java·数据结构·算法
秋野酱17 分钟前
基于 Spring Boot 的银行柜台管理系统设计与实现(源码+文档+部署讲解)
java·spring boot·后端
JAVA学习通31 分钟前
JAVA多线程(8.0)
java·开发语言
不当菜虚困34 分钟前
JAVA设计模式——(七)代理模式
java·设计模式·代理模式
joke_xiaoli43 分钟前
tomcat Server 连接服务器 进展
java·服务器·tomcat
獨枭44 分钟前
Spring Boot 连接 Microsoft SQL Server 实现登录验证
spring boot·后端·microsoft