Browse Source

Merge pull request #18170 from dreis2211

* pr/18170:
  Polish "Remove management.health.status.order from docs"
  Fix link formatting in custom HealthIndicator section
  Remove management.health.status.order from docs

Closes gh-18170
pull/18187/head
Stephane Nicoll 6 years ago
parent
commit
691cb9aff2
  1. 2
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/health/HealthProperties.java
  2. 9
      spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  3. 2
      spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

2
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; @@ -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; @@ -33,6 +34,7 @@ import org.springframework.boot.actuate.health.HealthEndpoint;
*/
public abstract class HealthProperties {
@NestedConfigurationProperty
private final Status status = new Status();
/**

9
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -28,6 +28,15 @@ @@ -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",

2
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 @@ -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:

Loading…
Cancel
Save