authorization cache cannot be obtained

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xujiangdong1992/article/details/80080317

有时候shiro会出现这个异常,只需要修改shiro配置文件,关闭cache

原来:
<bean id="userRealm" class="com.qingqing.bpt.shiro.UserRealm"/>
改为:
    <bean id="userRealm" class="com.qingqing.bpt.shiro.UserRealm">
        <property name="cachingEnabled" value="true"></property>
        <property name="authenticationCachingEnabled" value="false"></property>
    </bean>

猜你喜欢

转载自blog.csdn.net/xujiangdong1992/article/details/80080317