From 754642e0cf328a2c0a570ed99cfa196f851b4475 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 27 Nov 2015 17:21:15 +0100 Subject: [PATCH] Document HealthIndicator naming convention Closes gh-4602 --- .../src/main/asciidoc/production-ready-features.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 6ae8a82a07..423d5fb052 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -323,7 +323,7 @@ additional details to be displayed. import org.springframework.stereotype.Component; @Component - public class MyHealth implements HealthIndicator { + public class MyHealthIndicator implements HealthIndicator { @Override public Health health() { @@ -337,6 +337,10 @@ additional details to be displayed. } ---- +NOTE: The identifier for a given `HealthIndicator` is the name of the bean without the +`HealthIndicator` suffix if it exists. In the example above, the health information will +be available in an entry named `my`. + In addition to Spring Boot's predefined {sc-spring-boot-actuator}/health/Status.{sc-ext}[`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