first, let's start by recognizing the main components of SPRINGMVC.
Front-end Controller (disatcherservlet): Receive request, response result, return can be json,string data type, also can be page (Model).
Processor Mapper (handlermapping): Locate the processor based on the URL, typically through an XML configuration or annotation.
Processor (Handler): That's what we often say about controller controllers, written by programmers.
Processor Adapter (Handleradapter): The processor can be packaged as an adapter so that multiple types of processors can be supported.
View Parser (Viewresovler): View resolution, return View object (common Jsp,freemark, etc.).
Second, the working principle of SPINGMVC
The following is a text step description in
: 1, the user sends a request to the front-end controller (Dispatcherservlet). 2, the front-end controller requests the processor mapper (handlermapping) to locate the processor (Handler). 3, locate the later Processor Mapper (handlermappering) to return the execution chain (Handlerexecutionchain) to the front-end controller. 4, the front-end controller (Dispatcherservlet) calls the processor adapter (Handleradapter) to execute the processor (Handler). 5, the processor adapter to perform the handler. 6, the processor finishes executing the processor adapter to return Modelandview. 7, the processor adapter returns Modelandview to the front-end controller. 8, the front-end controller requests the View parser (Viewresolver) to parse the view. 9, the View resolver returns view to the front-end controller. 10, the front-end controller renders the view. 11, the front-end controller responds to the user with the result.