first, the SPRINGMVC has 6 major components1. Front controller Dispatcherservlet
2. Processor Mapper Handlermapping
3. Processor Adapter Handleradapter
4. Processor Handler
5. View Resolver views Resolver
6. Views View
second, several major components of the basic process 1.initiating a request to the front-end controller(Dispatcherservlet)2, Front Controller request handlermapping find Handler (can be found according to XML configuration, annotations) 3, Processor mapper handlermapping back to the front controller handler 4, the front controller calls the processor adapter to perform handler 5, processor adapter to perform handler 6.Handlerexecution finishes to adapter returnModelandview7. The processor adapter returns Modelandview to the front-end controller (Modelandview is an underlying object of the SPRINGMVC framework, including model and view) 8, the front controller requests the view parser to do the view resolution "resolves to a real view (JSP) According to the logical view name" 9. View Resolver to Front controller return view 10. Front-end controller for view rendering "View rendering fills the model data (in the Modelandview object) into the request domain" 11, the front controller to the user response results third, flow chart
iv. function of components1. Front Controller dispatcherservlet (no programmer development required)
Function: Receive request, response result, equivalent to transponder, CPU.
with the Dispatcherservlet, the coupling between the other components is reduced. 2, Processor mapper handlermapping (no programmer development required)
function : Find handler based on the URL requested3. Processor Adapter Handleradapter
function : Execute handler According to the specific rules (Handleradapter requirements)4. Processor Handler (programmer development Required) Note: When writing handler, follow Handleradapter's instructions so that the adapter can go to the correct execution handler 5. View Resolver views Resolver (no programmer development required)
function : Perform a view resolution, resolve to a real view based on the logical View name (view)6. Views view (requires programmer to develop JSP)
View is an interface that implements classes that support different view types (JSP, Freemarker, pdf ...). )
SPRINGMVC Notes 1