11 2023 档案

解决spring gateway 在globalFilter 中改写response后前端接到的数据不完整问题
摘要:表现情况 1. 前端请求后不响应 2. 前端接到的数据不完整 是因为修改返回体后没修改header 中的content-length. 设置成正确的content-length 就可以了 response.getHeaders().setContentLength(bodyStr.getBytes( 阅读全文

posted @ 2023-11-23 16:38 cococooder 阅读(223) 评论(0) 推荐(0) 编辑

Spring Gateway 同时拦截输入输出做日志操作
摘要:Spring Gateway 同时拦截输入输出做日志操作,包括request body, 和response body 主要靠代理模式,参考 https://stackoverflow.com/questions/47182961/copy-of-the-request-response-body- 阅读全文

posted @ 2023-11-10 17:36 cococooder 阅读(154) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示