Authored by mali

redis统一用ufo的redis

... ... @@ -25,10 +25,10 @@ import java.util.concurrent.TimeUnit;
public class LoginSessionService {
private static final Logger logger = LoggerFactory.getLogger(LoginSessionService.class);
@Redis("yohoNoSyncRedis")
@Redis("gwNoSyncRedis")
private YHRedisTemplate redisTemplate;
@Redis("yohoNoSyncRedis")
@Redis("gwNoSyncRedis")
private YHValueOperations yhValueOperations;
/**
... ...
package com.yohobuy.ufo;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
/**
* Created by li.ma on 2019/1/14.
*/
public class Test1 {
// 搜索查询的数据,抽取商品编码
public static void main(String[] args) throws IOException {
String fileName = "C:\\Users\\li.ma\\Desktop\\result.json";
BufferedReader stream = new BufferedReader(new FileReader(fileName));
List<Integer> idList = new ArrayList<>();
while (stream.read()!=-1) {
String line = stream.readLine();
if (null != line && line.contains("\"id\":")) {
int i = line.lastIndexOf("\"id\":");
idList.add(Integer.valueOf(line.substring(i + 5)));
}
}
System.out.println(idList);
}
}
... ...
... ... @@ -41,10 +41,10 @@ import java.util.concurrent.TimeUnit;
needUpdate = true)
public class BuyerOrderWithoutPaidTimeoutCancelMonitor implements YhJob {
@Redis("yohoNoSyncRedis")
@Redis("gwNoSyncRedis")
private YHValueOperations yhValueOperations;
@Redis("yohoNoSyncRedis")
@Redis("gwNoSyncRedis")
private YHHashOperations hashOperations;
@Autowired
... ...
... ... @@ -4,7 +4,7 @@ redis:
- 192.168.102.45:6379
auth: redis9646
yohoNoSyncRedis :
gwNoSyncRedis :
servers:
- 192.168.102.45:6379
auth: redis9646
... ...
redis:
yohoNoSyncRedis :
gwNoSyncRedis :
servers:
- ${redis.ufo.twemproxy.addresses}
auth: ${redis.ufo.twemproxy.auth}
\ No newline at end of file
... ...