标签:service ide 远程 return cto dynamic val comment actor
向注册中心写入动态配置覆盖规则:(通过由监控中心或治理中心的页面完成)
RegistryFactory registryFactory = ExtensionLoader.getExtensionLoader(RegistryFactory.class).getAdaptiveExtension();
Registry registry = registryFactory.getRegistry(URL.valueOf("zookeeper://10.20.153.10:2181"));
registry.register(URL.valueOf("override://0.0.0.0/com.foo.BarService?category=configurators&dynamic=false&application=foo&mock=force:return+null"));
其中:
mock=force:return+null
还可以改为:
mock=fail:return+null
标签:service ide 远程 return cto dynamic val comment actor
原文地址:http://www.cnblogs.com/jmbkeyes/p/7542738.html