zno2

No cache or cacheManager properties have been set. Authorization cache cannot be obtained.

20235 [http-bio-8080-exec-10] INFO  o.a.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set.  Authorization cache cannot be obtained. 

 

原因是:自定义的Realm文件在继承AuthorizingRealm 时,没有设置cache或者cacheManager属性

解决办法有两种:

1.是关闭cache

    <bean id="dbRealm" class="cn.zno.smse.common.security.DataBaseRealm">
        <property name="cachingEnabled" value="true"></property>
        <property name="authenticationCachingEnabled" value="false"></property>
    </bean>

2.是设置cache或者cacheManager

必须是实现了 org.apache.shiro.cache.CacheManager 接口的类

posted on 2016-08-05 17:45  zno2  阅读(3339)  评论(0编辑  收藏  举报

导航