Shiro在Web.xml中shiroFilter的Mapping配置错误

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)

at com.feinno.module.security.web.JsonLoginController.login(JsonLoginController.java:41)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 

出现上面的问题,是我在修改springMVC整体的URL后缀(原来是MVC)为html的时候出现,我忘记修改shiroFilter的入口mapping的配置为.html造成的错误。



shiroFilter
org.springframework.web.filter.DelegatingFilterProxy


shiroFilter
*.jsp
REQUEST
FORWARD


shiroFilter
*.mvc
REQUEST
FORWARD



修改为


shiroFilter
*.html
REQUEST
FORWARD


你可能感兴趣的:(【apache,shiro】)