Commit 4eba424f by Nepxion

修正ZooKeeper装饰的Bug

parent 0000ecdb
...@@ -9,6 +9,11 @@ package com.nepxion.discovery.plugin.framework.decorator; ...@@ -9,6 +9,11 @@ package com.nepxion.discovery.plugin.framework.decorator;
* @version 1.0 * @version 1.0
*/ */
import java.util.concurrent.atomic.AtomicReference;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.x.discovery.ServiceDiscovery;
import org.springframework.cloud.zookeeper.discovery.ZookeeperInstance;
import org.springframework.cloud.zookeeper.serviceregistry.ZookeeperRegistration; import org.springframework.cloud.zookeeper.serviceregistry.ZookeeperRegistration;
import org.springframework.cloud.zookeeper.serviceregistry.ZookeeperServiceRegistry; import org.springframework.cloud.zookeeper.serviceregistry.ZookeeperServiceRegistry;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
...@@ -84,6 +89,16 @@ public class ZookeeperServiceRegistryDecorator extends ZookeeperServiceRegistry ...@@ -84,6 +89,16 @@ public class ZookeeperServiceRegistryDecorator extends ZookeeperServiceRegistry
serviceRegistry.afterSingletonsInstantiated(); serviceRegistry.afterSingletonsInstantiated();
} }
@Deprecated
public CuratorFramework getCurator() {
return serviceRegistry.getCurator();
}
@Deprecated
public AtomicReference<ServiceDiscovery<ZookeeperInstance>> getServiceDiscoveryRef() {
return serviceRegistry.getServiceDiscoveryRef();
}
public ConfigurableEnvironment getEnvironment() { public ConfigurableEnvironment getEnvironment() {
return environment; return environment;
} }
......
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