idea报错failed to start bean‘documentationpluginsbootstrapper‘
在使用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
idea常见报错及解决梳理
1:error:cannot determine path to ‘tools.jar’ library for 16 (/library/java/javavirtualmachines/jdk-16.0.2.jdk/contents/home)
找不到16版本的‘tools.jar’文件
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
发表评论