|
@@ -19,6 +19,7 @@ public class SseController {
|
|
|
private SSEService sseService;
|
|
|
|
|
|
@GetMapping(path = "/sse", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
|
|
+ @LoginRequired
|
|
|
public SseEmitter handleSse() throws InterruptedException {
|
|
|
SseEmitter sseEmitter = new SseEmitter(0L); // 设置超时时间
|
|
|
sseService.monitor(sseEmitter);
|