springboot版本2.6以上使用swagger报错问题

springboot版本2.6以上使用swagger,会出现包扫描为空的错误

解决方法1:

将spring boot版本到2.5以下

解决方法2:

在application.properties中加上

spring.mvc.pathmatch.matching-strategy=ant_path_matcher

解决方法3:

在启动类加上@EnableWebMvc

你可能感兴趣的:(spring,boot,java,spring)