org.apache.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Auth...

項目中用spring shiro來處理權限的問題,可是啓動的時候會打印以下日誌spring

org.apache.shiro.realm.AuthorizingRealm  - No cache or cacheManager properties have been set.  Authorization cache cannot be obtained.

檢查了basicRelam配置以下apache

<bean id="basicRealm" class="com.ebon.platform.realm.BasicRealm" />

BasicRealm繼承自AuthorizingRealmspa

根據提示信息能夠判斷未給BasicRealm指定cacheManager,因此修改以下日誌

<bean id="basicRealm" class="com.ebon.platform.realm.BasicRealm" >
        <property name="authorizationCacheName" value="shiro-authorizationCache"/>
        <property name="cacheManager" ref="shiroCacheManager"/>
</bean>
相關文章
相關標籤/搜索