配置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即可