|
|
|
@ -16,6 +16,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.actuate.autoconfigure; |
|
|
|
package org.springframework.boot.actuate.autoconfigure; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.LinkedHashMap; |
|
|
|
import java.util.LinkedHashMap; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Properties; |
|
|
|
import java.util.Properties; |
|
|
|
@ -36,6 +37,7 @@ import org.springframework.boot.actuate.endpoint.RequestMappingEndpoint; |
|
|
|
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint; |
|
|
|
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint; |
|
|
|
import org.springframework.boot.actuate.endpoint.TraceEndpoint; |
|
|
|
import org.springframework.boot.actuate.endpoint.TraceEndpoint; |
|
|
|
import org.springframework.boot.actuate.endpoint.VanillaPublicMetrics; |
|
|
|
import org.springframework.boot.actuate.endpoint.VanillaPublicMetrics; |
|
|
|
|
|
|
|
import org.springframework.boot.actuate.health.HealthIndicator; |
|
|
|
import org.springframework.boot.actuate.metrics.reader.MetricReader; |
|
|
|
import org.springframework.boot.actuate.metrics.reader.MetricReader; |
|
|
|
import org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository; |
|
|
|
import org.springframework.boot.actuate.metrics.repository.InMemoryMetricRepository; |
|
|
|
import org.springframework.boot.actuate.trace.InMemoryTraceRepository; |
|
|
|
import org.springframework.boot.actuate.trace.InMemoryTraceRepository; |
|
|
|
@ -59,7 +61,7 @@ import org.springframework.web.servlet.handler.AbstractHandlerMethodMapping; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* {@link EnableAutoConfiguration Auto-configuration} for common management |
|
|
|
* {@link EnableAutoConfiguration Auto-configuration} for common management |
|
|
|
* {@link Endpoint}s. |
|
|
|
* {@link Endpoint}s. |
|
|
|
* |
|
|
|
* |
|
|
|
* @author Dave Syer |
|
|
|
* @author Dave Syer |
|
|
|
* @author Phillip Webb |
|
|
|
* @author Phillip Webb |
|
|
|
* @author Greg Turnquist |
|
|
|
* @author Greg Turnquist |
|
|
|
@ -71,6 +73,9 @@ public class EndpointAutoConfiguration { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private InfoPropertiesConfiguration properties; |
|
|
|
private InfoPropertiesConfiguration properties; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired(required = false) |
|
|
|
|
|
|
|
Map<String, HealthIndicator<? extends Object>> healthIndicators = new HashMap<String, HealthIndicator<? extends Object>>(); |
|
|
|
|
|
|
|
|
|
|
|
@Autowired(required = false) |
|
|
|
@Autowired(required = false) |
|
|
|
private MetricReader metricRepository = new InMemoryMetricRepository(); |
|
|
|
private MetricReader metricRepository = new InMemoryMetricRepository(); |
|
|
|
|
|
|
|
|
|
|
|
@ -92,7 +97,7 @@ public class EndpointAutoConfiguration { |
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
@ConditionalOnMissingBean |
|
|
|
@ConditionalOnMissingBean |
|
|
|
public HealthEndpoint healthEndpoint() { |
|
|
|
public HealthEndpoint healthEndpoint() { |
|
|
|
return new HealthEndpoint(); |
|
|
|
return new HealthEndpoint(this.healthIndicators); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
|