mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Format Code
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
package com.alibaba.cloud.dubbo.registry;
|
||||
|
||||
import com.alibaba.cloud.dubbo.registry.event.ServiceInstancePreRegisteredEvent;
|
||||
import com.alibaba.cloud.dubbo.registry.event.ServiceInstanceRegisteredEvent;
|
||||
import org.aspectj.lang.annotation.After;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import com.alibaba.cloud.dubbo.registry.event.ServiceInstancePreRegisteredEvent;
|
||||
import com.alibaba.cloud.dubbo.registry.event.ServiceInstanceRegisteredEvent;
|
||||
import org.springframework.cloud.client.serviceregistry.Registration;
|
||||
import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
|
@@ -59,6 +59,10 @@ public class SpringCloudRegistryFactory implements RegistryFactory {
|
||||
public SpringCloudRegistryFactory() {
|
||||
}
|
||||
|
||||
public static void setApplicationContext(ConfigurableApplicationContext applicationContext) {
|
||||
SpringCloudRegistryFactory.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
protected void init() {
|
||||
if (initialized || applicationContext == null) {
|
||||
return;
|
||||
@@ -75,8 +79,4 @@ public class SpringCloudRegistryFactory implements RegistryFactory {
|
||||
return new SpringCloudRegistry(url, discoveryClient, dubboServiceMetadataRepository,
|
||||
dubboMetadataConfigServiceProxy, jsonUtils, applicationContext);
|
||||
}
|
||||
|
||||
public static void setApplicationContext(ConfigurableApplicationContext applicationContext) {
|
||||
SpringCloudRegistryFactory.applicationContext = applicationContext;
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,8 @@ import static java.util.Collections.unmodifiableCollection;
|
||||
|
||||
/**
|
||||
* An event raised after the {@link ServiceInstance instances} of one service has been changed.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
public class ServiceInstancesChangedEvent extends ApplicationEvent {
|
||||
|
||||
|
Reference in New Issue
Block a user