|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2012-2018 the original author or authors. |
|
|
|
* Copyright 2012-2019 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -16,12 +16,10 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.actuate.autoconfigure.health; |
|
|
|
package org.springframework.boot.actuate.autoconfigure.health; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
import reactor.core.publisher.Flux; |
|
|
|
import reactor.core.publisher.Flux; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.ObjectProvider; |
|
|
|
|
|
|
|
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; |
|
|
|
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; |
|
|
|
import org.springframework.boot.actuate.health.HealthAggregator; |
|
|
|
import org.springframework.boot.actuate.health.HealthAggregator; |
|
|
|
import org.springframework.boot.actuate.health.HealthIndicator; |
|
|
|
import org.springframework.boot.actuate.health.HealthIndicator; |
|
|
|
@ -87,13 +85,11 @@ public class HealthIndicatorAutoConfiguration { |
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
@ConditionalOnMissingBean |
|
|
|
@ConditionalOnMissingBean |
|
|
|
public ReactiveHealthIndicatorRegistry reactiveHealthIndicatorRegistry( |
|
|
|
public ReactiveHealthIndicatorRegistry reactiveHealthIndicatorRegistry( |
|
|
|
ObjectProvider<Map<String, ReactiveHealthIndicator>> reactiveHealthIndicators, |
|
|
|
Map<String, ReactiveHealthIndicator> reactiveHealthIndicators, |
|
|
|
ObjectProvider<Map<String, HealthIndicator>> healthIndicators) { |
|
|
|
Map<String, HealthIndicator> healthIndicators) { |
|
|
|
return new ReactiveHealthIndicatorRegistryFactory() |
|
|
|
return new ReactiveHealthIndicatorRegistryFactory() |
|
|
|
.createReactiveHealthIndicatorRegistry( |
|
|
|
.createReactiveHealthIndicatorRegistry(reactiveHealthIndicators, |
|
|
|
reactiveHealthIndicators |
|
|
|
healthIndicators); |
|
|
|
.getIfAvailable(Collections::emptyMap), |
|
|
|
|
|
|
|
healthIndicators.getIfAvailable(Collections::emptyMap)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|