文章详情页
java - Spring 中的WebAsyncManager 有什么应用场景?
浏览:58日期:2023-12-15 14:32:18
问题描述
说明:第一张图片是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.
意思是主要用来管理异步请求的处理。什么时候要用到异步处理呢?就是业务逻辑复杂(或者其他原因),为了避免请求线程阻塞,需要委托给另一个线程的时候。
标签:
java
相关文章:
1. css - transform: translateY(-50%)在360浏览器极速模式下使得文字变模糊了2. mysql优化 - mysql慢查询copying to tmp table3. nginx英文文档的WebSocket proxying部分没看太明白,麻烦推荐一点中文文章4. python - 关于matplotlib的x轴显示的问题5. android 文件File删除问题6. css - .clearfix:after中为什么设置display: table7. angular.js - 怎样在使用ng-repeat属性的标签里面监听单个事件,使其能够单个改变CSS。8. angular.js - js 点击事件onclick=“”,引号内的函数名字 可以为 变量吗9. 请教: 关于 python 反斜杠转义的疑问10. angular.js - Ionic 集成crosswalk后生成的apk在android4.4.2上安装失败???
排行榜
