shiro报错No SecurityManager accessible

  在使用shiro的过程中报错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.

  在查找后观察到在applicationContext-shiro.xml中已经配置了securityManager,

在确认在web.xml已经配置了shiroFitler的过滤器的情况下最终确认为strust2的filer应该放置在shiro的filter后面,这是web.xml的执行顺序问题

猜你喜欢

转载自blog.csdn.net/YunyiDH/article/details/78175009