How to understand springMVC?

springMVC works?

Simple to understand: client sends a request -> DispathServelt front end controller accepts the request of a client -> processor mapping found HandMapping -> Found Handler Processor -> processor returns a model view ModelAndView -> view parser returns parsed ---- ---- a front end view of the object to obtain a controller to the user view objects ----

Detailed works Figure:

 

 

 

1.Tomcat loaded at startup parsing web.xml, to find the front-side bus controller DispatcherServlet spring mvc, and to load the relevant profile information DispatcherServlet.

2.DispatcherServlet receiving the client request corresponding to the HandlerMapping found, according to the mapping rule, find the corresponding processor (Handler).

3. The method of call processing in the respective processor, processes the request, returns a ModelAndView.

The view object 4.DispatcherServlet ModelAndView obtained to find a suitable ViewResolver (view resolver), a view resolver configuration, the DispatcherServlet data to be displayed corresponding to the view, and finally displayed to the user.

 

Guess you like

Origin www.cnblogs.com/FSY15767366954/p/11442245.html