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
相关推荐
晓杰在写后端18 分钟前
从0到1实现Balatro游戏后端(9):Blind奖励结算与金币系统实现
后端·游戏开发
Patrick_Wilson21 分钟前
幂等到底是什么?从前端视角讲透 SQL、HTTP 与 POST 接口的幂等设计
前端·后端·架构
凌览22 分钟前
一人公司别再上 Jenkins,真不值
前端·后端
菜鸟谢26 分钟前
Rust 元组与数组内存管理笔记
后端
oil欧哟26 分钟前
Codex 最佳实践(超级长文):先搞懂 AI,再用好 AI
前端·人工智能·后端
AskHarries27 分钟前
把一个外部系统接成 MCP 工具
后端·程序员
释然小师弟43 分钟前
Android开发十年:反思与回顾
android·后端·嵌入式
用户31693538118344 分钟前
如何从零编写一个 Spring Boot Starter
spring boot
雪隐1 小时前
个人电脑玩AI-04让5060 Ti给你打工——本地FLUX.2 Klein 的 AI 图片生成
人工智能·后端
掘金者阿豪1 小时前
多台服务器日志怎么统一清理?Ansible、Cron与cpolar自动化方案
后端