|
@@ -19,7 +19,7 @@ public class SseController {
|
|
|
private SSEService sseService;
|
|
|
|
|
|
@GetMapping(path = "/sse", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
|
|
|
- public SseEmitter handleSse(@RequestParam("token") String token) throws InterruptedException {
|
|
|
+ public SseEmitter handleSse(@RequestParam(value = "token", required = false, defaultValue = "") String token) throws InterruptedException {
|
|
|
SseEmitter sseEmitter = new SseEmitter(0L); // 设置超时时间
|
|
|
sseService.monitor(token, sseEmitter);
|
|
|
Thread.sleep(500);
|