fix: SSE 流式转发从 RestTemplate 改用 OkHttp,支持真正的逐行流式读取,解决缓冲导致的一下子全出来问题

This commit is contained in:
2026-07-21 22:48:52 +08:00
parent b24e176579
commit 3d1cc24fc4
2 changed files with 105 additions and 69 deletions
+7
View File
@@ -104,6 +104,13 @@
<scope>runtime</scope>
</dependency>
<!-- OkHttp:用于 SSE 流式转发,替代 RestTemplate 的缓冲行为 -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.12.0</version>
</dependency>
<!-- JSON -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>