Shiro的clearCachedAuthenticationInfo为null

时间:2018-04-25 09:20:29

标签: java spring-mvc spring-boot redis shiro

当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);
        }
    }

}

click me to see the picture

导致会话无法清除,寻求解决方案

0 个答案:

没有答案