springboot启动报错:Failed to start bean ‘documentationPluginsBootstrapper‘

今天启动时,突然报了这个错误,网上查了下是springboot版本和swagger版本之间的问题,解决办法如下:
原因: 这是因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。
解决方法: 在application.yml中添加

spring
 mvc:
    pathmatch:
      matching-strategy: ant_path_matcher
posted @ 2022-12-01 16:50  小log  阅读(472)  评论(0编辑  收藏  举报