Browser request and server response (five components)

Insert picture description here

First component:
Browser (browser) requests, such as request data, page request, requests are made to the rear end of the front end controller (the DispatcherServlet) is received, the
bottom is the servlet SpirngMVC underlying JDBC MyBatis is
actually Do a lot of package reflection to request, the
Insert picture description here
second component:
HandlerMappeing is the mapping processor, who corresponds to who, the bottom layer is the Map collection, after coming in, look for user and save in HandlerMapper, find suitable, the
third component: Adapter The
fourth component: the modelandView
adapter will return a result to ModelandView.
  Model is data, View is page.
In spring, you can return to the page or return data, depending on how you choose, this returns the page.
Insert picture description here
The following page returns the data
Insert picture description here
Model and View in modelandView are together, the
fifth step: ViewResolver is the view resolver, its role is to resolve model and View, first return the view, and then return the data. It
needs to be configured
Insert picture description here

Guess you like

Origin blog.csdn.net/GTC_GZ/article/details/108685946