swagger2接口问题?
来源:9-14 验证用户账户微服务功能可用性(下)

慕勒9329818
2022-07-08
通过http测试过了所有controller。在AccountApplication的日志里都没有问题。
但是,访问http://127.0.0.1:8003/ecommerce-account-service/swagger-ui.html时拦截器的preHandle中无法通过白名单验证跳过身份验证,会到我们写的那个身份验证失败的运行时异常。
我打日志发现
`request.requestURI: [/ecommerce-account-service/error], is white list url: [false], request.requestURL: [http://127.0.0.1:8003/ecommerce-account-service/error]`
也就是说访问链接进入Tomcat后swagger-ui.html被替换成error,但是我不知道怎么找原因了,因为HttpServletRequest是Tomcat解析后的吧?
写回答
2回答
-
张勤一
2022-07-11
看起来逻辑应该没有问题,白名单 list 可以看看我是怎么配置的;另外,日志也是通过配置定义的
10 -
橘Cc
2022-12-09
可能没找到静态资源吧
00
相似问题