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前面即可

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM