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

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐