Browse Source

:white_check_mark: 时间修改

Aron 6 years ago
parent
commit
8f6fe40d65
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/main/java/com/ifast/api/config/JWTConfigProperties.java

+ 4 - 2
src/main/java/com/ifast/api/config/JWTConfigProperties.java

@@ -4,6 +4,8 @@ import lombok.Data;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.stereotype.Component;
 
+import java.util.concurrent.TimeUnit;
+
 /**
  * <pre>
  * </pre>
@@ -22,7 +24,7 @@ public class JWTConfigProperties {
     /**
      * jwt过期时间,默认2小时,单位为毫秒
      */
-    private Long expireTime = 7200000L;
+    private Long expireTime = TimeUnit.HOURS.toMillis(2);
     /**
      * <pre>
      *   refresh_token过期时间,默认7天,单位为毫秒
@@ -34,6 +36,6 @@ public class JWTConfigProperties {
      *      30 day:2592000000
      *  </pre>
      */
-    private Long refreshTokenExpire = 604800000L;
+    private Long refreshTokenExpire = TimeUnit.DAYS.toMillis(7);
 
 }