org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code

异常提示

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.
at org.apache.shiro.SecurityUtils.getSecurityManager(SecurityUtils.java:123)
at org.apache.shiro.subject.Subject$Builder.(Subject.java:627)
at org.apache.shiro.SecurityUtils.getSubject(SecurityUtils.java:56)

 

异常原因

SecurityManager 
算了 不写了

 

解决方案

把shiro的filter放到所有filter的最前面 web.xml、也可以这么说,放到Spring框架的filter前面即可

 

posted @ 2017-10-18 13:57  图生  阅读(7042)  评论(0)    收藏  举报