配置spring+shiro时,启动tomcat报错异常
严重: Context initialization failed |
解决办法:
web.xml拦截器异常
如下web.xml 拦截器代码
1 <servlet> 2 <servlet-name>DispatcherServlet</servlet-name> 3 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> 4 <init-param> 5 <param-name>contextConfigLocation</param-name> 6 <param-value>classpath:spring/springmvc.xml</param-value> 7 </init-param> 8 <load-on-startup>1</load-on-startup> 9 <async-supported>true</async-supported> 10 </servlet> 11 <servlet-mapping> 12 <servlet-name>DispatcherServlet</servlet-name> 13 <url-pattern>/</url-pattern> 14 </servlet-mapping> 15
查找后得知:web.xml版本号为2.3 修改版本号为3.0即可