Commit 063364d2 authored by 黎博's avatar 黎博

修改redis配置及新增过期时间

parent 1e7e551a
......@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.net.URISyntaxException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Service
......@@ -242,6 +243,7 @@ public class XyqbGenDataServiceImpl implements XyqbGenDataService {
public void setUserStatusRedisValue(String namespace, String phoneNo, Integer status) {
String redisKey = namespace + "_" + phoneNo;
redisTemplate.opsForValue().set(redisKey, status);
redisTemplate.expire(redisKey,1800, TimeUnit.SECONDS);
}
......
......@@ -13,8 +13,8 @@ spring:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
redis:
host: 172.17.5.5
port: 32236
host: 172.17.5.17
port: 31509
database: 0
password:
jedis:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment