From 461c390cf79333e591e5f03fcd4a82b804c0e158 Mon Sep 17 00:00:00 2001 From: MichaelWin Date: Fri, 31 Oct 2025 17:31:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=8F=82=E6=95=B0=E6=8B=A6=E6=88=AA=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/corewing/app/config/SaTokenConfig.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/corewing/app/config/SaTokenConfig.java b/src/main/java/com/corewing/app/config/SaTokenConfig.java index 3122d2a..279888a 100644 --- a/src/main/java/com/corewing/app/config/SaTokenConfig.java +++ b/src/main/java/com/corewing/app/config/SaTokenConfig.java @@ -2,6 +2,7 @@ package com.corewing.app.config; import cn.dev33.satoken.interceptor.SaInterceptor; import cn.dev33.satoken.stp.StpUtil; +import com.corewing.app.common.page.PageInterceptor; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -17,6 +18,8 @@ public class SaTokenConfig implements WebMvcConfigurer { */ @Override public void addInterceptors(InterceptorRegistry registry) { + // 分页参数拦截 + registry.addInterceptor(new PageInterceptor()); // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())) // 拦截所有路由