Commit a603201f authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #5328 from anandshah123/feature/gh-5326

* pr/5328:
  Polish contribution
  Rename HealthIndicatorAutoConfigurationProperties
parents 73cbb2f4 aba9389b
......@@ -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;
}
......
/*
* 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment