springboot 集成Swagger2报错 Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is
springboot 集成Swagger2报错 Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
原因:因为Springfox使用的路径匹配是基于AntPathMatcher的,
而Spring Boot 2.6.X使用的是PathPatternMatcher。
方法1:
修改application.yml
spring:
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
方法2:
swagger2版本为2.9.2,springboot版本为2.6.2时
Springboot版本过高,降为2.5.6
var code = “c4947b71-5776-406a-a960-643c019da1ff”
本文来自博客园,作者:日报初级开发工程师,转载请注明原文链接:https://www.cnblogs.com/april-code/p/18814590

浙公网安备 33010602011771号