场景描述
SpringBoot引入knife4j + Swagger报错
Failed to start bean 'documentationPluginsBootstrapper'
引入版本
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.7</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
</dependencies>
解决
修改配置文件 application.yml
spring:
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
参考 IDEA报错之Failed to start bean ‘documentationPluginsBootstrapper‘问题及解决方案