Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 西罗';s clearCachedAuthenticationInfo为空_Java_Spring Mvc_Spring Boot_Redis_Shiro - Fatal编程技术网

Java 西罗';s 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

当shiro执行clearCachedAuthenticationInfo时,会出现以下问题:

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,因此没有什么可删除的。你能提供更多关于你申请的信息吗?用户登录时是否填充缓存?