Shiro报错UnavailableSecurityManagerException

运行整合了shiro的spring报错:
org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code,either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
第一个可能的原因是配置错误,该报错最后一句说了,无效配置。所以就要查看自己写的web.xml,以及spring.xml、shiro.xml是否正确,若都是正确的,那么查看shiro.xml的shiroFilter的位置,要放在首位,然后在里面加上REQUEST
FORWARD
INCLUDE
ERROR。若是这样了还是报同样的错,那么第二个原因是并没有该对象,也就是并未登陆或者没获取到登录的数据,也就是没有保存登录信息,所以找不到。

你可能感兴趣的:(BUG,shiro)