|
@@ -97,7 +97,7 @@ public class JWTUtils {
|
97
|
97
|
// 有效期 7 天
|
98
|
98
|
Calendar calendar = Calendar.getInstance();
|
99
|
99
|
calendar.setTime(new Date());
|
100
|
|
- calendar.add(Calendar.HOUR, 2);
|
|
100
|
+ calendar.add(Calendar.DAY_OF_WEEK, 2);
|
101
|
101
|
// calendar.set(Calendar.DAY_OF_MONTH,calendar.get(Calendar.DAY_OF_MONTH)+7);
|
102
|
102
|
|
103
|
103
|
return Jwts.builder().setClaims(subject).setExpiration(calendar.getTime()).signWith(key).compact();
|