'提交代码'

dev-discount
= 3 years ago
parent fd2d43e8b4
commit 0568934862
  1. 25
      hai-cweb/src/main/resources/prod-9401/application.yml
  2. 2
      hai-service/src/main/java/com/hai/common/security/UserCenter.java

@ -27,18 +27,19 @@ spring:
testOnReturn: false testOnReturn: false
poolPreparedStatements: true poolPreparedStatements: true
maxOpenPreparedStatements: 20 maxOpenPreparedStatements: 20
redis:
database: 0 redis:
host: 127.0.0.1 database: 0
port: 36379 host: 127.0.0.1
password: HF123456.Redis port: 36379
timeout: 1000 password: HF123456.Redis
jedis: timeout: 1000
pool: jedis:
max-active: 20 pool:
max-wait: -1 max-active: 20
max-idle: 10 max-wait: -1
min-idle: 0 max-idle: 10
min-idle: 0
#thymelea模板配置 #thymelea模板配置
thymeleaf: thymeleaf:
prefix: classpath:/templates/ prefix: classpath:/templates/

@ -24,7 +24,7 @@ public class UserCenter {
private RedisUtil redisUtil; private RedisUtil redisUtil;
private final String COOKIE_FIELD = "_ida"; private final String COOKIE_FIELD = "_ida";
private final int EXPIRE = 3600;//cookie过期时间为1小时,3600秒 private final int EXPIRE = 3600 * 24 * 7;//cookie过期时间为7天
/** /**
* 判断用户是否登录,并且不能单个用户同时登录 * 判断用户是否登录,并且不能单个用户同时登录

Loading…
Cancel
Save