mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-21 19:17:25 +08:00
重构:全局过滤器执行函数放到成员变量里.
This commit is contained in:
@@ -30,8 +30,21 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
// @Bean
|
||||
// public SaServletFilter getSaReactorFilter() {
|
||||
// return new SaServletFilter()
|
||||
// // 指定 [拦截路由]
|
||||
// .addInclude("/**")
|
||||
// .addExclude("/favicon.ico");
|
||||
// // 指定 [放行路由]
|
||||
// .addExclude("/favicon.ico")
|
||||
// // 指定[认证函数]: 每次请求执行
|
||||
// .setAuth(r -> {
|
||||
// System.out.println("---------- sa全局认证");
|
||||
// SaRouterUtil.match("/test/test", () -> StpUtil.checkLogin());
|
||||
// })
|
||||
// // 指定[异常处理函数]:每次[认证函数]发生异常时执行此函数
|
||||
// .setError(e -> {
|
||||
// System.out.println("---------- sa全局异常 ");
|
||||
// return AjaxJson.getError(e.getMessage());
|
||||
// })
|
||||
// ;
|
||||
// }
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user