修复 swagger 404 的问题

This commit is contained in:
YunaiV
2022-11-16 21:52:33 +08:00
parent f6420e301e
commit 969b9c3458
3 changed files with 26 additions and 8 deletions

View File

@ -17,8 +17,8 @@ spring:
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
throw-exception-if-no-handler-found: true # 404 错误时抛出异常,方便统一处理
static-path-pattern: /static/** # 静态资源路径; 注意:如果不配置,则 throw-exception-if-no-handler-found 不生效!!!
# throw-exception-if-no-handler-found: true # 404 错误时抛出异常,方便统一处理
# static-path-pattern: /static/** # 静态资源路径; 注意:如果不配置,则 throw-exception-if-no-handler-found 不生效!!! TODO 芋艿:不能配置,会导致 swagger 不生效
# Jackson 配置项
jackson: