Spring MVC
overview
MVC (Model View Controller, Model-View-Controller) , as a design pattern, is used for layered development of applications.
Spring MVC , a lightweight web development framework based on the MVC design pattern provided by the Spring framework. Spring MVC provides a front controller DispatcherServlet to dispatch requests, and then make MVC pattern development more efficient by configuring handler mapping, view resolution, etc.
Five components of Spring MVC: front controller DispatcherServlet , processor mapping HandlerMapping , processor Controller , model view ModelAndView , view resolver ViewResolver .
Fundamental
- The front-end controller DispatcherServlet receives client requests and invokes the corresponding processor Controller according to the handler mapping HandlerMapping configuration
- The processor Controller will process the request, encapsulate the result into a model view ModelAndView object and return it to the front controller DispatcherServlet
- Front Controller Dispatches