修改了token的过期时间,添加了websocket测试接口

This commit is contained in:
DESKTOP-G8BCEP0\HP 2021-07-20 17:26:17 +08:00
parent 084bb672da
commit 613c4cf2b3
2 changed files with 7 additions and 1 deletions

View File

@ -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 // 生成JWT
String jwt = Jwts.builder() String jwt = Jwts.builder()

View File

@ -207,4 +207,10 @@ public class FirePointController {
return firePointService.selectFirePointNumMonth(); return firePointService.selectFirePointNumMonth();
} }
} }
@GetMapping("/websocketTest")
public void websocketTest(@RequestParam("message") String message){
WebSocketServer.broadInfo(message);
}
} }