问题描述:
最近搭建的springboot项目的时候,应该是默认使用的是springboot的最新版本,导致我引入swagger2config的时候就启动报错,因为这个文件之前能用,但是拿过来就不好使,在网上找了很长时间,大多数都是修改配置文件的,很显然不能解决问题。
报错信息:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
解决办法:
pom文件我也是直接拿过来就用的,可能是低版本的swagger和高版本的springboot不兼容,于是我修改了springboot的版本,奇妙的就好了。
修改前:<