From 716e7646893d4e81d72012c44eeaf608885bc461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=9B=84?= Date: Tue, 27 May 2025 14:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=94=BE=E5=BC=80=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=99=BB=E5=BD=95=E8=AE=A4=E8=AF=81=EF=BC=8C=E6=96=B9?= =?UTF-8?q?=E4=BE=BF=E5=89=8D=E7=AB=AF=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dite/znpt/config/WebMvcConfig.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/com/dite/znpt/config/WebMvcConfig.java b/core/src/main/java/com/dite/znpt/config/WebMvcConfig.java index 9cbae0f..3271777 100644 --- a/core/src/main/java/com/dite/znpt/config/WebMvcConfig.java +++ b/core/src/main/java/com/dite/znpt/config/WebMvcConfig.java @@ -38,16 +38,16 @@ public class WebMvcConfig implements WebMvcConfigurer { registry.addResourceHandler("/static/image/temp/**").addResourceLocations("file:" + uploadTempPath); } - @Override - public void addInterceptors(InterceptorRegistry registry) { - // 注册 Sa-Token 拦截器,定义详细认证规则 - registry.addInterceptor(new SaInterceptor(handler -> { - SaRouter - .match("/**") // 拦截的 path 列表,可以写多个 */ - .notMatch(excludePaths()) - .check(r -> StpUtil.checkLogin()); - })).addPathPatterns("/**"); - } +// @Override +// public void addInterceptors(InterceptorRegistry registry) { +// // 注册 Sa-Token 拦截器,定义详细认证规则 +// registry.addInterceptor(new SaInterceptor(handler -> { +// SaRouter +// .match("/**") // 拦截的 path 列表,可以写多个 */ +// .notMatch(excludePaths()) +// .check(r -> StpUtil.checkLogin()); +// })).addPathPatterns("/**"); +// } // 动态获取哪些 path 可以忽略鉴权 public List excludePaths() {