提交 a1e02477 作者: 方治民

feat: 新增 @AuthIgnore 注解, 忽略接口鉴权

上级 644b7772
......@@ -42,10 +42,7 @@ public class SaTokenConfigure implements WebMvcConfigurer {
.notMatch("/favicon.ico", "/**/*.html", "/**/*.js", "/**/*.css")
.notMatch("/v2/api-docs/**", "/v3/api-docs/**", "/swagger-resources/**")
// 自定义注解忽略接口鉴权
.notMatch(r -> {
HandlerMethod method = (HandlerMethod) handler;
return method.hasMethodAnnotation(AuthIgnore.class);
})
.notMatch(r -> ((HandlerMethod) handler).hasMethodAnnotation(AuthIgnore.class))
.check(r -> StpUtil.checkLogin());
})
)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论