Commit d78b34fa LN

增加配置完整性验证

1 个父辈 a216d74e
package com.neotel.smfcore.hella.tcp;
import cn.hutool.core.util.ObjectUtil;
import com.google.common.base.Strings;
import com.neotel.smfcore.common.bean.ResultBean;
import com.neotel.smfcore.common.utils.StringUtils;
......@@ -65,8 +66,12 @@ public class HellaTcpClient {
host=dataCache.GetConfigCache("hella.host","hella.host",host);
port=Integer.parseInt(dataCache.GetConfigCache("hella.port","hella.port",port+"")) ;
updateServerInfo(host, port);
if(ObjectUtil.isEmpty(host)||ObjectUtil.isEmpty(port)){
log.info("配置不完整,不需要连接");
}else{
start();
}
}
public static void updateServerInfo(String serverHost, int serverPort){
host = serverHost;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!