Commit f660bb3e by 陶光胜

init

parent f59737c8
package com.gic.enterprise.utils;
import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService;
import org.apache.dubbo.config.ReferenceConfig;
import org.apache.dubbo.config.RegistryConfig;
import org.apache.dubbo.config.utils.ReferenceConfigCache;
......@@ -33,7 +35,10 @@ public class AsyncCallbackUtils {
logger.info("回调:{},接口路径:{},接口方法名称:{}" ,JSONObject.toJSONString(obj), interfaceUrl, method);
RegistryConfig registry = new RegistryConfig();
//todo 上线修改zookeeper地址
registry.setAddress("zookeeper://10.105.220.75:2199");
Config config = ConfigService.getConfig("COMMON.4.0-gic-properties");
String zkHost = config.getProperty("zookeeper.host", "");
String zkPort = config.getProperty("zookeeper.port", "");
registry.setAddress("zookeeper://"+zkHost+":"+zkPort);
registry.setCheck(false);
ReferenceConfig<GenericService> reference = new ReferenceConfig<>();
reference.setInterface(interfaceUrl);
......
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