org.apache.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Authorization cache cannot be obtained.
项目中用spring shiro来处理权限的问题,但是启动的时候会打印如下日志
org.apache.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Authorization cache cannot be obtained.
检查了basicRelam配置如下
<bean id="basicRealm" class="com.ebon.platform.realm.BasicRealm" />
BasicRealm继承自AuthorizingRealm
根据提示信息可以判断未给BasicRealm指定cacheManager,所以修改如下
<bean id="basicRealm" class="com.ebon.platform.realm.BasicRealm" > <property name="authorizationCacheName" value="shiro-authorizationCache"/> <property name="cacheManager" ref="shiroCacheManager"/> </bean>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。