今天在集成spring-boot 2.6.2与springfox-swagger时有一次碰到了下边的错,其实这个错在之前已经遇到过了,并且用后边的配置解决掉了,但是今天在一个新项目中又出现了,通过使用相同的配置并不生效。
16:42:00.994 [main] ERROR o.s.b.SpringApplication [line:819] - 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)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java

在整合spring-boot 2.6.2和springfox-swagger时遇到错误,该错误之前已解决,但在新项目中重现。经过排查,发现问题出在spring-boot-starter-actuator依赖上,注释掉该依赖问题得到解决。
最低0.47元/天 解锁文章
6937

被折叠的 条评论
为什么被折叠?



