From 0568934862fd92b1b520f5eb8ab04decde6b5604 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sat, 28 Aug 2021 01:44:52 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/prod-9401/application.yml | 25 ++++++++++--------- .../com/hai/common/security/UserCenter.java | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hai-cweb/src/main/resources/prod-9401/application.yml b/hai-cweb/src/main/resources/prod-9401/application.yml index da59540e..627ed8ef 100644 --- a/hai-cweb/src/main/resources/prod-9401/application.yml +++ b/hai-cweb/src/main/resources/prod-9401/application.yml @@ -27,18 +27,19 @@ spring: testOnReturn: false poolPreparedStatements: true maxOpenPreparedStatements: 20 - redis: - database: 0 - host: 127.0.0.1 - port: 36379 - password: HF123456.Redis - timeout: 1000 - jedis: - pool: - max-active: 20 - max-wait: -1 - max-idle: 10 - min-idle: 0 + + redis: + database: 0 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 #thymelea模板配置 thymeleaf: prefix: classpath:/templates/ diff --git a/hai-service/src/main/java/com/hai/common/security/UserCenter.java b/hai-service/src/main/java/com/hai/common/security/UserCenter.java index 5f5647fe..3ab19a9c 100644 --- a/hai-service/src/main/java/com/hai/common/security/UserCenter.java +++ b/hai-service/src/main/java/com/hai/common/security/UserCenter.java @@ -24,7 +24,7 @@ public class UserCenter { private RedisUtil redisUtil; private final String COOKIE_FIELD = "_ida"; - private final int EXPIRE = 3600;//cookie过期时间为1小时,3600秒 + private final int EXPIRE = 3600 * 24 * 7;//cookie过期时间为7天 /** * 判断用户是否登录,并且不能单个用户同时登录