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 接口的类


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM