Throughout the SPRINGMVC framework, Dispatcherservlet is at the core and is responsible for coordinating and organizing the work of different components to complete request processing and return responses. The specific process is:
1) The client sends an HTTP request, and the Web application server receives the request, and if it matches the Dispatcherservlet mapping path (configured in Web. xml), the Web container will forward the request to dispatcherservlet processing;
2) Dispatcherservlet the controller to process the request based on the requested information and the configuration of the handlermapping;
3) After the controller completes the business logic processing, returns a Modelandview to Dispatcherservlet;
4) Dispatcherservlet The resolution of the view from the Viewresolver to the real view object through the Modelandview;
5) Dispatcherservlet The View object based on the data model in the Modelandview, the resulting response message from the client may be a normal HTML page or an XML or JSON string. Even a picture or a PDF document in a different media format.
SPRINGMVC Work Flow