lyhzzz 2 年之前
父節點
當前提交
fdb15d8826
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main/java/com/fdkankan/manage/config/SaTokenConfigure.java

+ 4 - 1
src/main/java/com/fdkankan/manage/config/SaTokenConfigure.java

@@ -12,12 +12,14 @@ import cn.dev33.satoken.stp.StpUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.nacos.common.utils.HttpMethod;
+import com.fdkankan.common.util.SecurityUtil;
 import com.fdkankan.manage.common.RedisKeyUtil;
 import com.fdkankan.manage.common.ResultCode;
 import com.fdkankan.manage.exception.BusinessException;
 import com.fdkankan.common.response.ResultData;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.util.RedisUtil;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
@@ -27,6 +29,7 @@ import java.util.HashMap;
 import java.util.List;
 
 @Configuration
+@Slf4j
 public class SaTokenConfigure {
 
     public static HashMap<String, JSONObject> manageMenuUrl = new HashMap<>();
@@ -42,7 +45,7 @@ public class SaTokenConfigure {
                 .addInclude("/**").addExclude("/**/reMyselfPassword","/test/**")
                 // 认证函数: 每次请求执行
                 .setAuth(obj -> {
-                    System.out.println("---------- 进入Sa-Token全局认证 -----------");
+                    log.info("---------- 进入Sa-Token全局认证 -----------");
                     // 登录认证 -- 拦截所有路由,并排除/user/doLogin 用于开放登录
                     SaRouter.match("/**", "/service/manage/login", r ->checkLogin() );
                     String menu = redisUtil.get(RedisKey.MANAGE_MENU);