Java 西罗';s clearCachedAuthenticationInfo为空
当shiro执行clearCachedAuthenticationInfo时,会出现以下问题:Java 西罗';s clearCachedAuthenticationInfo为空,java,spring-mvc,spring-boot,redis,shiro,Java,Spring Mvc,Spring Boot,Redis,Shiro,当shiro执行clearCachedAuthenticationInfo时,会出现以下问题: protected void clearCachedAuthenticationInfo(PrincipalCollection principals) { if (!CollectionUtils.isEmpty(principals)) { // return null Cache<Object, AuthenticationInfo> cach
protected void clearCachedAuthenticationInfo(PrincipalCollection principals) {
if (!CollectionUtils.isEmpty(principals)) {
// return null
Cache<Object, AuthenticationInfo> cache = this.getAvailableAuthenticationCache();
if (cache != null) {
Object key = this.getAuthenticationCacheKey(principals);
cache.remove(key);
}
}
}
受保护的无效clearCachedAuthenticationInfo(PrincipalCollection主体){
如果(!CollectionUtils.isEmpty(主体)){
//返回空值
Cache Cache=this.getAvailableAuthenticationCache();
if(缓存!=null){
Object key=this.getAuthenticationCacheKey(主体);
缓存。删除(键);
}
}
}
导致无法清除会话,正在寻求解决方案欢迎使用堆栈溢出!请不要链接到代码的图像。相反,在问题文本中尽可能准确、简洁地描述你的问题。请看下面这篇文章,详细解释为什么代码的图像不是一个好主意:它看起来像是您的auth缓存为null,因此没有什么可删除的。你能提供更多关于你申请的信息吗?用户登录时是否填充缓存?