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,
|
RabbitAutoConfiguration.class, SolrAutoConfiguration.class,
|
||||||
MailSenderAutoConfiguration.class, JmsAutoConfiguration.class,
|
MailSenderAutoConfiguration.class, JmsAutoConfiguration.class,
|
||||||
ElasticsearchAutoConfiguration.class })
|
ElasticsearchAutoConfiguration.class })
|
||||||
@EnableConfigurationProperties({ HealthIndicatorAutoConfigurationProperties.class })
|
@EnableConfigurationProperties({ HealthIndicatorProperties.class })
|
||||||
public class HealthIndicatorAutoConfiguration {
|
public class HealthIndicatorAutoConfiguration {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private HealthIndicatorAutoConfigurationProperties configurationProperties = new HealthIndicatorAutoConfigurationProperties();
|
private HealthIndicatorProperties properties = new HealthIndicatorProperties();
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
@ConditionalOnMissingBean(HealthAggregator.class)
|
@ConditionalOnMissingBean(HealthAggregator.class)
|
||||||
public OrderedHealthAggregator healthAggregator() {
|
public OrderedHealthAggregator healthAggregator() {
|
||||||
OrderedHealthAggregator healthAggregator = new OrderedHealthAggregator();
|
OrderedHealthAggregator healthAggregator = new OrderedHealthAggregator();
|
||||||
if (this.configurationProperties.getOrder() != null) {
|
if (this.properties.getOrder() != null) {
|
||||||
healthAggregator.setStatusOrder(this.configurationProperties.getOrder());
|
healthAggregator.setStatusOrder(this.properties.getOrder());
|
||||||
}
|
}
|
||||||
return healthAggregator;
|
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");
|
* 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.
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
*/
|
*/
|
||||||
@ConfigurationProperties("management.health.status")
|
@ConfigurationProperties("management.health.status")
|
||||||
public class HealthIndicatorAutoConfigurationProperties {
|
public class HealthIndicatorProperties {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Comma-separated list of health statuses in order of severity.
|
* Comma-separated list of health statuses in order of severity.
|
Loading…
Reference in New Issue