Pictures from Baidu
1, initiating a request to a front-end controller
2, front-end controller request Handlermapping Lookup handler can be found based on XML configuration Annotations
3, processor mapper handlermapping back to the front-end controller Handler
4, the front-end controller calls the processor adapter to process handler
5, the processor adapter executes handler
6, Handler finishes processing the adapter back Modelandview
7, Processor adapter returned to front end controller Modelandview
Modelandview is the underlying object of Springmvx+c
8, the front-end controller requests the view resolver to parse the view Resolves to a real view based on the logical view name
9, the view resolver returns to the front controller view
10, and the front-end controller renders the view
View rendering is to populate the model data (Modelandview object) into the request domain
11, the front controller responds to the user results
Component:
1, front controller dispatcherservlet:
function Receive request, response result equivalent to forwarder
(CPU reduce coupling of other components)
2, Processor Mapper: Find Handler based on the requested URL (no programmer development required)
Handler (programmer development Required)
3, processor adapter: Execute according to specific rules Handler (Handleradapter required rules) (Do not need programmer development)
write handler in accordance with Handleradapter requirements to do
4, View resolver: Parse from logical view to True view
5, Views view (requires programmer to develop JSP)
View is an interface implementation class that supports different view types (JSP freemarker pdf)
Spring MVC: Introduction to the framework and its components