Description: The first picture is the processRequest method of FrameworkServlet,
question:
(1) WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request);
asyncManager.registerCallableInterceptor(FrameworkServlet.class.getName(), new RequestBindingInterceptor());
What do these two lines of code do?
(2) What problems does WebAsyncManager solve and what scenarios is it used in?
Seniors and masters don’t hesitate to give pointers
For this kind of problem, it is recommended to check the official Spring documentation
WebAsyncManager http://docs.spring.io/spring/...
There is a paragraph in the middle:
The central class for managing asynchronous request processing, mainly intended as an SPI and not typically used directly by application classes.
It means it is mainly used to manage the processing of asynchronous requests. When should asynchronous processing be used? It is when the business logic is complex (or for other reasons) and in order to avoid blocking the request thread, it needs to be delegated to another thread.