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