Merge pull request #5328 from anandshah123/feature/gh-5326
* pr/5328: Polish contribution Rename HealthIndicatorAutoConfigurationProperties
This commit is contained in:
commit
a603201f05
|
@ -100,18 +100,18 @@ import org.springframework.mail.javamail.JavaMailSenderImpl;
|
|||
RabbitAutoConfiguration.class, SolrAutoConfiguration.class,
|
||||
MailSenderAutoConfiguration.class, JmsAutoConfiguration.class,
|
||||
ElasticsearchAutoConfiguration.class })
|
||||
@EnableConfigurationProperties({ HealthIndicatorAutoConfigurationProperties.class })
|
||||
@EnableConfigurationProperties({ HealthIndicatorProperties.class })
|
||||
public class HealthIndicatorAutoConfiguration {
|
||||
|
||||
@Autowired
|
||||
private HealthIndicatorAutoConfigurationProperties configurationProperties = new HealthIndicatorAutoConfigurationProperties();
|
||||
private HealthIndicatorProperties properties = new HealthIndicatorProperties();
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(HealthAggregator.class)
|
||||
public OrderedHealthAggregator healthAggregator() {
|
||||
OrderedHealthAggregator healthAggregator = new OrderedHealthAggregator();
|
||||
if (this.configurationProperties.getOrder() != null) {
|
||||
healthAggregator.setStatusOrder(this.configurationProperties.getOrder());
|
||||
if (this.properties.getOrder() != null) {
|
||||
healthAggregator.setStatusOrder(this.properties.getOrder());
|
||||
}
|
||||
return healthAggregator;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2016 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.
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* @since 1.2.0
|
||||
*/
|
||||
@ConfigurationProperties("management.health.status")
|
||||
public class HealthIndicatorAutoConfigurationProperties {
|
||||
public class HealthIndicatorProperties {
|
||||
|
||||
/**
|
||||
* Comma-separated list of health statuses in order of severity.
|
Loading…
Reference in New Issue