java - Spring 中的WebAsyncManager 有什么应用场景?
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-17 09:59:17
0
1
691

说明:第一张图片是FrameworkServlet的processRequest方法,

问题:

(1) WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request);

    asyncManager.registerCallableInterceptor(FrameworkServlet.class.getName(), new RequestBindingInterceptor());

这两行代码有什么作用

(2)WebAsyncManager 是处理什么问题的,应用在什么场景?

前辈、大神不吝指点

曾经蜡笔没有小新
曾经蜡笔没有小新

全部回复(1)
迷茫

这种问题建议查看Spring官方文档
WebAsyncManager http://docs.spring.io/spring/...

中间有一段:

The central class for managing asynchronous request processing, mainly intended as an SPI and not typically used directly by application classes.

意思是主要用来管理异步请求的处理。什么时候要用到异步处理呢?就是业务逻辑复杂(或者其他原因),为了避免请求线程阻塞,需要委托给另一个线程的时候。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!