springboot使用SSE返回数据
时间: 2024-04-27 17:20:24 浏览: 180
SpringBoot可以使用SSE(Server-Sent Events)来向前端发送数据。SSE是一种服务器端到客户端的单向消息推送协议。在SpringBoot中,可以使用SseEmitter类来实现SSE的消息推送功能。 SSE适用于后端更新状态通知前端刷新的场景,可以避免前端需要主动刷新页面才能获取到更新的数据。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [springboot整合sse](https://blog.csdn.net/qq_41604890/article/details/127852300)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [后端刷新前端页面-springboot使用sse向vue前端发送数据](https://blog.csdn.net/PPPPei/article/details/128421206)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文