...
|
...
|
@@ -151,8 +151,8 @@ public class SecurityInterceptor implements HandlerInterceptor, ApplicationEvent |
|
|
cacheKey = getSessionCacheKey(jSessionID, clientType, sessionType);
|
|
|
sessionInfo = valueOperations.get(cacheKey);
|
|
|
if(null == sessionInfo){ //如果REDIS主从延迟, 从主REDIS中获取SESSION
|
|
|
cacheKey = RedisKeyBuilder.newInstance().appendFixed(SESSION_CACHE_KEY_PRE).appendVar(jSessionID);
|
|
|
sessionInfo = valueOperations.get(cacheKey);
|
|
|
RedisKeyBuilder commonCacheKey = RedisKeyBuilder.newInstance().appendFixed(SESSION_CACHE_KEY_PRE).appendVar(jSessionID);
|
|
|
sessionInfo = valueOperations.get(commonCacheKey);
|
|
|
}
|
|
|
}catch (Exception redisException){
|
|
|
//如果redis异常,直接放通
|
...
|
...
|
@@ -161,7 +161,8 @@ public class SecurityInterceptor implements HandlerInterceptor, ApplicationEvent |
|
|
}
|
|
|
|
|
|
//8 session双云同步延迟时,获取用户session
|
|
|
if(null == sessionInfo){
|
|
|
//兼容处理session缓存值不为数字的情况
|
|
|
if(null == sessionInfo || (StringUtils.isNotEmpty(sessionInfo) && !StringUtils.isNumeric(sessionInfo))){
|
|
|
sessionInfo = this.getUserSesion(cacheKey,uid, jSessionID, clientType, sessionType);
|
|
|
}
|
|
|
|
...
|
...
|
|