diff --git a/src/main/java/com/xkrs/common/account/TokenAuthenticationService.java b/src/main/java/com/xkrs/common/account/TokenAuthenticationService.java index 777adb2..0ae8969 100644 --- a/src/main/java/com/xkrs/common/account/TokenAuthenticationService.java +++ b/src/main/java/com/xkrs/common/account/TokenAuthenticationService.java @@ -79,7 +79,7 @@ public class TokenAuthenticationService { /** * 动态设置过期时间 */ - final long EXPIRATIONTIME = 60 * 60 * duration.toDays() * 24_000 ; + final long EXPIRATIONTIME = 60 * 60 * (duration.toDays()+1) * 24_000 ; // 生成JWT String jwt = Jwts.builder() diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index 0890889..4c3eca2 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -207,4 +207,10 @@ public class FirePointController { return firePointService.selectFirePointNumMonth(); } } + + @GetMapping("/websocketTest") + public void websocketTest(@RequestParam("message") String message){ + + WebSocketServer.broadInfo(message); + } }