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