When consolidating spring,springmvc,hibernate, because the configuration file of Springmvc is removed from the Webinf folder under SRC, Idea cannot find the configuration file from the default location and needs to specify the address in Web. Xml.
The original is:
<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>
Add Address: Note the file name<param-name>contextconfiglocation</param-namehere, the error is not loaded .
<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>
From for notes (Wiz)
Could not open ServletContext resource [/web-inf/applicationcontext.xml] Workaround