Commit 6ea7012e authored by shenjiaqing's avatar shenjiaqing

提交代码

parent 3143f352
......@@ -38,7 +38,7 @@ allprojects {
}
group = "cn.com.duiba.boot"
version = "0.0.11"
version = "0.0.12-SNAPSHOT"
}
subprojects {
......
......@@ -109,7 +109,7 @@ public class CacheConfig {
}
}
}catch(Exception e){
logger.warn("", e);
logger.warn("缓存备份失败", e);
}
}
}
......@@ -119,12 +119,17 @@ public class CacheConfig {
@Order(Ordered.LOWEST_PRECEDENCE-1)
public void onServerCache(){
try{
logger.info("进来了");
// 本地缓存预热开关 : 默认关闭
if (!cacheEnable) {
logger.warn("Cache preheating failed,because cacheEnable is false");
return;
}
List<InstanceInfo> instances = eurekaClient.getApplication(appName).getInstances();
if (CollectionUtils.isEmpty(instances)) {
logger.warn("获取容器列表为空!");
return;
}
logger.info("container of all registered AppInfo : {}",instances);
List<InstanceInfo> list = instances.stream().sorted(Comparator.comparing(InstanceInfo::getLastUpdatedTimestamp).reversed()).collect(Collectors.toList());
logger.info("container of all registered AppInfo : {}",list);
......
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