@ -30,6 +30,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.context.properties.EnableConfigurationProperties ;
import org.springframework.boot.context.properties.EnableConfigurationProperties ;
import org.springframework.context.annotation.Bean ;
import org.springframework.context.annotation.Bean ;
import org.springframework.context.annotation.Configuration ;
import org.springframework.context.annotation.Configuration ;
import org.springframework.util.CollectionUtils ;
/ * *
/ * *
* Configuration to adapt legacy deprecated health endpoint classes and interfaces .
* Configuration to adapt legacy deprecated health endpoint classes and interfaces .
@ -46,7 +47,7 @@ class LegacyHealthEndpointCompatibilityConfiguration {
@ConditionalOnMissingBean
@ConditionalOnMissingBean
HealthAggregator healthAggregator ( HealthIndicatorProperties healthIndicatorProperties ) {
HealthAggregator healthAggregator ( HealthIndicatorProperties healthIndicatorProperties ) {
OrderedHealthAggregator aggregator = new OrderedHealthAggregator ( ) ;
OrderedHealthAggregator aggregator = new OrderedHealthAggregator ( ) ;
if ( healthIndicatorProperties . getOrder ( ) ! = null ) {
if ( ! CollectionUtils . isEmpty ( healthIndicatorProperties . getOrder ( ) ) ) {
aggregator . setStatusOrder ( healthIndicatorProperties . getOrder ( ) ) ;
aggregator . setStatusOrder ( healthIndicatorProperties . getOrder ( ) ) ;
}
}
return aggregator ;
return aggregator ;
@ -56,7 +57,7 @@ class LegacyHealthEndpointCompatibilityConfiguration {
@ConditionalOnMissingBean
@ConditionalOnMissingBean
HealthStatusHttpMapper healthStatusHttpMapper ( HealthIndicatorProperties healthIndicatorProperties ) {
HealthStatusHttpMapper healthStatusHttpMapper ( HealthIndicatorProperties healthIndicatorProperties ) {
HealthStatusHttpMapper mapper = new HealthStatusHttpMapper ( ) ;
HealthStatusHttpMapper mapper = new HealthStatusHttpMapper ( ) ;
if ( healthIndicatorProperties . getHttpMapping ( ) ! = null ) {
if ( ! CollectionUtils . isEmpty ( healthIndicatorProperties . getHttpMapping ( ) ) ) {
mapper . setStatusMapping ( healthIndicatorProperties . getHttpMapping ( ) ) ;
mapper . setStatusMapping ( healthIndicatorProperties . getHttpMapping ( ) ) ;
}
}
return mapper ;
return mapper ;