标签:
在整合spring,springMVC,hibernate的时候,因为从webinf的文件夹下移除了springMVC的配置文件到src下,所以,idea从默认的位置找不到配置文件,需要在web.xml指定地址。
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.form</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:mvc_config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.form</url-pattern>
</servlet-mapping>
Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
标签:
原文地址:http://www.cnblogs.com/share2015/p/5337482.html