springboot升级2.7.12后整合swagger3.0 报错Failed to start bean ‘documentationPluginsBootstrapper

一、报错如下

在这里插入图片描述

二、报错原因

  • Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X之后使用的是PathPatternMatcher。

三、解决方式

  • 在application.yml里配置如下内容

    spring:
      mvc:
    	  pathmatch:
    	    matching-strategy: ant_path_matcher
    

猜你喜欢

转载自blog.csdn.net/li1325169021/article/details/131277366