孙永军 1 жил өмнө
parent
commit
7a0e28b035

+ 1 - 0
src/main/java/com/sxtvs/open/api/review/controller/SseController.java

@@ -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);