|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2013-2014 the original author or authors. |
|
|
|
|
* Copyright 2013-2017 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -12,12 +12,12 @@
@@ -12,12 +12,12 @@
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
|
|
|
* See the License for the specific language governing permissions and |
|
|
|
|
* limitations under the License. |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
package org.springframework.cloud.netflix.eureka; |
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.boot.actuate.endpoint.Endpoint; |
|
|
|
|
import org.springframework.boot.actuate.health.HealthAggregator; |
|
|
|
|
import org.springframework.boot.actuate.health.OrderedHealthAggregator; |
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
|
|
|
@ -30,7 +30,6 @@ import org.springframework.context.annotation.Bean;
@@ -30,7 +30,6 @@ import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
import org.springframework.context.event.EventListener; |
|
|
|
|
|
|
|
|
|
import com.netflix.appinfo.EurekaInstanceConfig; |
|
|
|
|
import com.netflix.appinfo.HealthCheckHandler; |
|
|
|
|
import com.netflix.discovery.EurekaClient; |
|
|
|
|
import com.netflix.discovery.EurekaClientConfig; |
|
|
|
@ -82,16 +81,6 @@ public class EurekaDiscoveryClientConfiguration {
@@ -82,16 +81,6 @@ public class EurekaDiscoveryClientConfiguration {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
|
@ConditionalOnClass(Endpoint.class) |
|
|
|
|
protected static class EurekaHealthIndicatorConfiguration { |
|
|
|
|
@Bean |
|
|
|
|
@ConditionalOnMissingBean |
|
|
|
|
public EurekaHealthIndicator eurekaHealthIndicator(EurekaClient eurekaClient, |
|
|
|
|
EurekaInstanceConfig instanceConfig, EurekaClientConfig clientConfig) { |
|
|
|
|
return new EurekaHealthIndicator(eurekaClient, instanceConfig, clientConfig); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
|
@ConditionalOnProperty(value = "eureka.client.healthcheck.enabled", matchIfMissing = false) |
|
|
|
|