spring boot2.6.2整合 swagger3.0.0导致项目启动失败
启动应用会报错
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.10.jar:5.3.10]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.10.jar:5.3.10]
使用 spring.mvc.pathmatch.matching-strategy: ant_path_matcher,未生效。
环境依赖
jdk8
spring boot 2.6.2
swagger [springfox-boot-starter(3.0.0)]
解决方案:
首先需要添加配置(必须)
spring:
mvc:
pathmat