有时候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>