From 7a49651e097d0e4460be4070720403fe02adf91c Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 6 Sep 2019 22:05:17 +0200 Subject: [PATCH 1/3] Remove management.health.status.order from docs See gh-18170 --- .../autoconfigure/health/HealthProperties.java | 2 ++ .../additional-spring-configuration-metadata.json | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthProperties.java index 53e2bc01d39..7ce78e2d31f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthProperties.java @@ -23,6 +23,7 @@ import java.util.Map; import java.util.Set; import org.springframework.boot.actuate.health.HealthEndpoint; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * Properties used to configure the health endpoint and endpoint groups. @@ -33,6 +34,7 @@ import org.springframework.boot.actuate.health.HealthEndpoint; */ public abstract class HealthProperties { + @NestedConfigurationProperty private final Status status = new Status(); /** diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index b991dbf9d90..e63814aac58 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -28,6 +28,15 @@ "name": "management.endpoint.health.show-details", "defaultValue": "never" }, + { + "name": "management.endpoint.health.status.order", + "defaultValue": [ + "DOWN", + "OUT_OF_SERVICE", + "UP", + "UNKNOWN" + ] + }, { "name": "management.endpoints.enabled-by-default", "type": "java.lang.Boolean", @@ -162,7 +171,10 @@ "OUT_OF_SERVICE", "UP", "UNKNOWN" - ] + ], + "deprecation": { + "replacement": "management.endpoint.health.status.order" + } }, { "name": "management.health.mail.enabled", From 0975b5b2203aeb8c91eaeba6b3c83605911d57a6 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Fri, 6 Sep 2019 22:22:32 +0200 Subject: [PATCH 2/3] Fix link formatting in custom HealthIndicator section See gh-18170 --- .../src/main/asciidoc/production-ready-features.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index a823f2fb30c..75dfd7c9e47 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -748,7 +748,7 @@ NOTE: The identifier for a given `HealthIndicator` is the name of the bean witho In the preceding example, the health information is available in an entry named `my`. In addition to Spring Boot's predefined {spring-boot-actuator-module-code}/health/Status.java[`Status`] types, it is also possible for `Health` to return a custom `Status` that represents a new system state. -In such cases, a custom implementation of the{spring-boot-actuator-module-code}/health/StatusAggregator.java[`StatusAggregator`] interface also needs to be provided, or the default implementation has to be configured by using the `management.endpoint.health.status.order` configuration property. +In such cases, a custom implementation of the {spring-boot-actuator-module-code}/health/StatusAggregator.java[`StatusAggregator`] interface also needs to be provided, or the default implementation has to be configured by using the `management.endpoint.health.status.order` configuration property. For example, assume a new `Status` with code `FATAL` is being used in one of your `HealthIndicator` implementations. To configure the severity order, add the following property to your application properties: From ae34ae78dc8b208161e7fa9f64f5696504aac76f Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 9 Sep 2019 14:13:46 +0200 Subject: [PATCH 3/3] Polish "Remove management.health.status.order from docs" See gh-18170 --- .../META-INF/additional-spring-configuration-metadata.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index e63814aac58..a63498afea0 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -171,10 +171,7 @@ "OUT_OF_SERVICE", "UP", "UNKNOWN" - ], - "deprecation": { - "replacement": "management.endpoint.health.status.order" - } + ] }, { "name": "management.health.mail.enabled",