项目起动时报错
Failed to start bean 'documentationPluginsBootstrapper';

解决方案:
原因: 这是因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。
解决:在application.properties里配置:spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER。
或yml配置:
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
在SpringBoot2.6及以上版本中,由于路径匹配策略的改变,Springfox启动时可能出现错误。这个问题可以通过在配置文件(application.properties或application.yml)中设置`spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER`来解决,恢复使用AntPathMatcher进行路径匹配。

1343

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



