Spring MVC is an opportunity dispacterservlet MVC framework in which each request is distributed through Dispacterservlet, with the following process:
After the 1.web container is loaded, the user sends a request to the server, the front controller Dispacterservlet receives the user's request, and then delegates the request to his parser processing (it does not process itself, as a unified access point, for global process Control).
2.HandlerMapping maps the request to a Handlerexecutionchain object (containing a handler processor (page Controller) object, multiple Handlerinterceptor Interceptor) objects, through this policy mode, It is easy to add a new mapping strategy;
3.handleradapter,handleradapter will package the processor as an adapter to support multiple types of processors;
4. Processor function processing method call, Handleradapter will be based on the results of the adaptation to call the real processor function processing method, complete the function processing, and return a Modelandview object (including model data, logical view name);
5.ViewResolver, Viewresolver will parse the logical view name into a specific view;
6.View will be rendered according to the model data passed in;
7. Return control to Dispatcherservlet, return the response by Dispatcherservlet to the user, to the end of this process.
Spring MVC Execution Process