![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring mvc
文章平均质量分 95
hello_noby
这个作者很懒,什么都没留下…
展开
-
http请求超时,tcp未正常四次挥手
目录背景问题复现代码背景一个很简单的需求,需要对controller层返回的异常报文,做简单的包装,比如将 异常、error、exception等关键字去掉(由于历史代码 各种异常提示不友好,而c端直接把提示弹出),替换成更友好的提示。方案一在Filter里面把response拿到,读取内容,然后替换。方案二使用ResponseBodyAdvice,对返回的报文做处理最终使用了方案二,更简单。一开始用方案一的时候,就遇到http请求超时,tcp未正常四次挥手断连。问题复现代码采用原创 2021-08-08 15:25:24 · 732 阅读 · 0 评论 -
SpringMvc 异步响应调用链源码追踪
主要流转类:org.springframework.web.context.request.async.WebAsyncManagerorg.springframework.web.context.request.async.WebAsyncManager#startCallableProcessing(org.springframework.web.context.request.async....原创 2019-04-02 14:25:56 · 691 阅读 · 0 评论 -
spring事务源码学习
spring事务调用入口:org.springframework.transaction.interceptor.TransactionAspectSupport#invokeWithinTransaction原创 2019-05-25 21:11:09 · 226 阅读 · 0 评论 -
spring mvc
初始化spring boot下初始化配置类:org.springframework.boot.autoconfigure.web.WebMvcAutoConfigurationspring boot 初始化时会扫描META-INF/spring.factories配置文件中配置的类,进行初始化关注一下几个初始化类: @Bean @Override public Request...原创 2019-07-23 14:30:46 · 159 阅读 · 0 评论