为了给spring boot项目引入swagger 出现了各种错误刚开始还以为是版本的问题 一直在降低版本 后来才发现是这个问题
因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。
解决办法,修改application.yaml
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
为了给spring boot项目引入swagger 出现了各种错误刚开始还以为是版本的问题 一直在降低版本 后来才发现是这个问题
因为Springfox使用的路径匹配是基于AntPathMatcher的,而Spring Boot 2.6.X使用的是PathPatternMatcher。
解决办法,修改application.yaml
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher