可能原因:spring-boot-2.6.0.jar:2.6.0和springfox-core-3.0.0.jar:3.0.0不兼容问题
解决在pom.xml文件添加依赖
<!--swagger-Ui-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
在application.yml配置文件里配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher