**Springboot整合swagger 启动项目时报错: ERROR Failed to start bean ‘documentationPluginsBootstrapper‘; nested

Springboot整合swagger 启动项目时报错: ERROR Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException

springboot2.6.0 和swagger2.9.2一起就会报这个错
降低springboot版本就好

在这里插入图片描述

报错信息是:
在这里插入图片描述
在这里插入图片描述

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-11-26 20:55:18.880 ERROR 93224 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.13.jar:5.3.13]
	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.13.jar:5.3.13]
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.13.jar:5.3.13]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_241]

**

解决方法是降低Springboot版本不要使用2.6.0 我换成了2.2.5就好了在这里插入图片描述


版权声明:本文为m0_48814910原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。