From 146c3d81458dcfcf9ef0a11d212dfa4b1841024a Mon Sep 17 00:00:00 2001 From: gsd Date: Tue, 9 Jan 2024 21:03:42 +0300 Subject: [PATCH] websocket support v2 --- .../app/controllers/debug/WebSocketPage.java | 5 +- .../IntegrationWebSockerHandler.java | 113 ++++++++++++++++++ .../java/app/websocket/WebSocketConfig.java | 8 +- .../java/app/websocket/WebSocketHandler.java | 2 +- 4 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 src/main/java/app/websocket/IntegrationWebSockerHandler.java diff --git a/src/main/java/app/controllers/debug/WebSocketPage.java b/src/main/java/app/controllers/debug/WebSocketPage.java index ee76c10..a56faed 100644 --- a/src/main/java/app/controllers/debug/WebSocketPage.java +++ b/src/main/java/app/controllers/debug/WebSocketPage.java @@ -2,6 +2,7 @@ package app.controllers.debug; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController @@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RestController; public class WebSocketPage { @GetMapping - public String getPage(){ + public String getPage(@RequestParam(required = false, defaultValue = "ws") String route){ return "\n" + "\n" + "\n" + @@ -56,7 +57,7 @@ public class WebSocketPage { "\n" + "\n" + "