最新版springboot+最新版swagger
Spring Boot 2.6.X使用PathPatternMatcher匹配路径,Swagger引用的Springfox使用的路径匹配是基于AntPathMatcher的,添加配置
spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER
本文介绍了在SpringBoot2.6.x中遇到的PathPatternMatcher与Swagger基于AntPathMatcher的路径匹配不一致问题。通过设置配置`spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER`,可以确保Swagger正确地与SpringBoot的路径匹配策略保持一致,从而避免潜在的API文档错误。
最新版springboot+最新版swagger
Spring Boot 2.6.X使用PathPatternMatcher匹配路径,Swagger引用的Springfox使用的路径匹配是基于AntPathMatcher的,添加配置
spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER
14万+
3854
1万+

被折叠的 条评论
为什么被折叠?
