1
0
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:
mercyblitz
2019-08-01 13:55:55 +08:00
parent 532c1dd0f2
commit 12efadd61f
37 changed files with 317 additions and 316 deletions

View File

@@ -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;

View File

@@ -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;
}
}

View File

@@ -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 {