SpringBoot2.6.x 整合swagger3.0 报错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

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐