From 5aaa1c016bf87bdd2b4591501c04b57ed5df84dd Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 11 Jun 2025 14:46:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B3=E5=B0=86=E8=BF=87=E6=9C=9F=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=88=A4=E6=96=AD=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java b/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java index d045710df..ead227f3d 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/security/JwtUtils.java @@ -231,7 +231,7 @@ public class JwtUtils implements InitializingBean { if (expirationTime != null) { // 判断是否即将过期, 默认剩余时间小于5分钟未即将过期 // 剩余时间 (秒) - long timeRemaining = LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8)) - expirationTime.getValue(); + long timeRemaining = expirationTime.getValue() - LocalDateTime.now().toEpochSecond(ZoneOffset.ofHours(8)); if (timeRemaining < 5 * 60) { jwtUser.setStatus(JwtUser.TokenStatus.EXPIRING_SOON); } else {