修改登录状态缓存时间为6小时

This commit is contained in:
Xubx 2025-05-20 17:32:40 +08:00
parent a92fdf126e
commit 50ac53221b
2 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ import org.jeecg.common.util.oConvertUtils;
public class JwtUtil {
/**Token有效期为7天Token在reids中缓存时间为两倍*/
public static final long EXPIRE_TIME = (7 * 12) * 60 * 60 * 1000;
public static final long EXPIRE_TIME = (6) * 60 * 60 * 1000;
static final String WELL_NUMBER = SymbolConstant.WELL_NUMBER + SymbolConstant.LEFT_CURLY_BRACKET;
/**

View File

@ -442,7 +442,7 @@ public class LoginController {
String token = JwtUtil.sign(username, syspassword);
// 设置token缓存有效时间
redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME * 2 / 1000);
redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, JwtUtil.EXPIRE_TIME / 1000);
obj.put("token", token);
//2.设置登录租户