This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new a3b60cf  SCB-405 support to disable the discovery client with 
configuration
a3b60cf is described below

commit a3b60cff9445b7f7d830656a96dc845df37793a2
Author: Willem Jiang <[email protected]>
AuthorDate: Thu Mar 15 17:04:02 2018 +0800

    SCB-405 support to disable the discovery client with configuration
---
 .../springboot/starter/discovery/CseDiscoveryClientConfiguration.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
 
b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
index 695568d..603d9a0 100644
--- 
a/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
+++ 
b/spring-boot-starter/spring-boot-starter-discovery/src/main/java/org/apache/servicecomb/springboot/starter/discovery/CseDiscoveryClientConfiguration.java
@@ -17,6 +17,7 @@
 package org.apache.servicecomb.springboot.starter.discovery;
 
 import org.springframework.boot.autoconfigure.AutoConfigureBefore;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.cloud.client.discovery.DiscoveryClient;
 import 
org.springframework.cloud.client.discovery.noop.NoopDiscoveryClientAutoConfiguration;
 import org.springframework.context.annotation.Bean;
@@ -28,6 +29,7 @@ import org.springframework.core.annotation.Order;
 public class CseDiscoveryClientConfiguration {
   @Bean
   @Order(5000)
+  @ConditionalOnProperty(value = "servicecomb.discoveryClient.enabled", 
havingValue = "true", matchIfMissing = true)
   public DiscoveryClient cseDiscoveryClient() {
     return new CseDiscoveryClient();
   }

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to