|
|
|
@ -1,10 +1,12 @@
@@ -1,10 +1,12 @@
|
|
|
|
|
package org.springframework.cloud.client; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import org.springframework.boot.actuate.health.HealthAggregator; |
|
|
|
|
import org.springframework.boot.actuate.health.HealthIndicator; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|
|
|
|
import org.springframework.cloud.client.discovery.DiscoveryClient; |
|
|
|
|
import org.springframework.cloud.client.discovery.DiscoveryClientHealthIndicator; |
|
|
|
|
import org.springframework.cloud.client.discovery.DiscoveryCompositeHealthIndicator; |
|
|
|
@ -13,8 +15,6 @@ import org.springframework.context.annotation.Bean;
@@ -13,8 +15,6 @@ import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
import org.springframework.core.annotation.Order; |
|
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Spencer Gibb |
|
|
|
|
*/ |
|
|
|
@ -25,7 +25,7 @@ public class CommonsClientAutoConfiguration {
@@ -25,7 +25,7 @@ public class CommonsClientAutoConfiguration {
|
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
|
@ConditionalOnBean(DiscoveryClient.class) |
|
|
|
|
@ConditionalOnExpression("${spring.cloud.discovery.enabled:true}") |
|
|
|
|
@ConditionalOnProperty(value = "spring.cloud.discovery.enabled", matchIfMissing = true) |
|
|
|
|
protected static class HealthConfiguration { |
|
|
|
|
@Bean |
|
|
|
|
public DiscoveryClientHealthIndicator instancesHealthIndicator(DiscoveryClient discoveryClient) { |
|
|
|
|