首先,我们来看一下SpringMVC的核心工作流程
根据SpringMVC框架的工作流程,我们需要依次来配置以下几个核心组件
1)在web.xml中配置前端控制器DispatcherServlet
<web-app>
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext-*.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url