解决IDEA报错Failed to start bean ‘documentationPluginsBootstrapper‘
前言白嫖容易,创作不易,若以下方案解决了问题烦请点赞支持一下(关注一下更好)在使用IDEA做项目时使用了Swagger进行接口文档的处理。swagger 使用的版本为2.9.2,Springboot版本是2.6.2问题启动项目后发生了以下核心报错:Failed to start bean 'documentationPluginsBootstrapper'; nested exception is
·
前言
白嫖容易,创作不易,若以下方案解决了问题烦请点赞支持一下(关注一下更好)
在使用IDEA做项目时使用了Swagger进行接口文档的处理。
swagger 使用的版本为2.9.2,Springboot版本是2.6.2
问题
启动项目后发生了以下核心报错:
Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
分析
网上各种解决方案皆为降低swagger版本或者降低Springboot版本,虽然有一定道理,但是实际上并不需要降低版本,发生这个问题的关键在于Springboot高版本更改了以前的默认配置(此处由于本人水平有限,说的不够明确,但无需在意)
解决
在application.properties的配置文件中将其改为原来的方式即可
同时这个也能解决swagger弹窗问题
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
更多推荐
已为社区贡献1条内容
所有评论(0)