
报这个错:Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException;是因为
自spring boot2.6之后,Spring MVC 处理映射匹配的默认策略已从AntPathMatcher更改为PathPatternParser。
当spring boot2.6整合swagger时,还是默认的认为springmvc的路径匹配策略是AntPathMatcher,
当启动时就会报错:
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)
解决方法:
在yml配置文件中添加对默认路径的修改配置:
:
:
:
:
原文链接:https://blog.csdn.net/xiulongshan/article/details/124561566