Prechádzať zdrojové kódy

:white_check_mark: 解决缓存与其他系统串用问题

Twelve615 1 rok pred
rodič
commit
4e6193cbc3

+ 3 - 3
airport/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java

@@ -72,10 +72,10 @@ public interface CommonConstant {
     public static final Integer SC_JEECG_NO_AUTHZ=510;
 
     /** 登录用户Shiro权限缓存KEY前缀 */
-    public static String PREFIX_USER_SHIRO_CACHE  = "shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:";
+    public static String PREFIX_USER_SHIRO_CACHE  = "airport:shiro:cache:org.jeecg.config.shiro.ShiroRealm.authorizationCache:";
     /** 登录用户Token令牌缓存KEY前缀 */
-    public static final String PREFIX_USER_TOKEN  = "prefix_user_token_";
-    public static final String PREFIX_NFT_USER_TOKEN  = "prefix_nft_user_token_";
+    public static final String PREFIX_USER_TOKEN  = "airport_prefix_user_token_";
+    public static final String PREFIX_NFT_USER_TOKEN  = "airport_prefix_nft_user_token_";
     /** Token缓存时间:3600秒即一小时 */
     public static final int  TOKEN_EXPIRE_TIME  = 3600;
     //二级市场订单

+ 2 - 0
airport/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/vo/LoginUser.java

@@ -2,6 +2,7 @@ package org.jeecg.common.system.vo;
 
 import java.util.Date;
 
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
@@ -21,6 +22,7 @@ import lombok.experimental.Accessors;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
+@JsonIgnoreProperties(ignoreUnknown = true)
 public class LoginUser {
 
 	/**

+ 14 - 14
airport/jeecg-boot-base/jeecg-boot-base-tools/src/main/java/org/jeecg/common/constant/CacheConstant.java

@@ -10,38 +10,38 @@ public interface CacheConstant {
 	/**
 	 * 字典信息缓存(含禁用的字典项)
 	 */
-    public static final String SYS_DICT_CACHE = "sys:cache:dict";
+    public static final String SYS_DICT_CACHE = "airport:sys:cache:dict";
 
 	/**
 	 * 字典信息缓存 status为有效的
 	 */
-	public static final String SYS_ENABLE_DICT_CACHE = "sys:cache:dictEnable";
+	public static final String SYS_ENABLE_DICT_CACHE = "airport:sys:cache:dictEnable";
 	/**
 	 * 表字典信息缓存
 	 */
-    public static final String SYS_DICT_TABLE_CACHE = "sys:cache:dictTable";
+    public static final String SYS_DICT_TABLE_CACHE = "airport:sys:cache:dictTable";
 	public static final String SYS_DICT_TABLE_BY_KEYS_CACHE = SYS_DICT_TABLE_CACHE + "ByKeys";
 
 	/**
 	 * 数据权限配置缓存
 	 */
-    public static final String SYS_DATA_PERMISSIONS_CACHE = "sys:cache:permission:datarules";
+    public static final String SYS_DATA_PERMISSIONS_CACHE = "airport:sys:cache:permission:datarules";
 
 	/**
 	 * 缓存用户信息
 	 */
-	public static final String SYS_USERS_CACHE = "sys:cache:user";
+	public static final String SYS_USERS_CACHE = "airport:sys:cache:user";
 
 	/**
 	 * 全部部门信息缓存
 	 */
-	public static final String SYS_DEPARTS_CACHE = "sys:cache:depart:alldata";
+	public static final String SYS_DEPARTS_CACHE = "airport:sys:cache:depart:alldata";
 
 
 	/**
 	 * 全部部门ids缓存
 	 */
-	public static final String SYS_DEPART_IDS_CACHE = "sys:cache:depart:allids";
+	public static final String SYS_DEPART_IDS_CACHE = "airport:sys:cache:depart:allids";
 
 
 	/**
@@ -52,12 +52,12 @@ public interface CacheConstant {
 	/**
 	 * 字典信息缓存
 	 */
-	public static final String SYS_DYNAMICDB_CACHE = "sys:cache:dbconnect:dynamic:";
+	public static final String SYS_DYNAMICDB_CACHE = "airport:sys:cache:dbconnect:dynamic:";
 
 	/**
 	 * gateway路由缓存
 	 */
-	public static final String GATEWAY_ROUTES = "sys:cache:cloud:gateway_routes";
+	public static final String GATEWAY_ROUTES = "airport:sys:cache:cloud:gateway_routes";
 
 
 	/**
@@ -80,24 +80,24 @@ public interface CacheConstant {
 	/**
 	 * online列表页配置信息缓存key
 	 */
-	public static final String ONLINE_LIST = "sys:cache:online:list";
+	public static final String ONLINE_LIST = "airport:sys:cache:online:list";
 
 	/**
 	 * online表单页配置信息缓存key
 	 */
-	public static final String ONLINE_FORM = "sys:cache:online:form";
+	public static final String ONLINE_FORM = "airport:sys:cache:online:form";
 
 	/**
 	 * online报表
 	 */
-	public static final String ONLINE_RP = "sys:cache:online:rp";
+	public static final String ONLINE_RP = "airport:sys:cache:online:rp";
 
 	/**
 	 * online图表
 	 */
-	public static final String ONLINE_GRAPH = "sys:cache:online:graph";
+	public static final String ONLINE_GRAPH = "airport:sys:cache:online:graph";
 	/**
 	 * 拖拽页面信息缓存
 	 */
-	public static final String DRAG_PAGE_CACHE = "drag:cache:page";
+	public static final String DRAG_PAGE_CACHE = "airport:drag:cache:page";
 }