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 0ad0e503d9..448699a94d 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 @@ -476,7 +476,31 @@ The following table shows the default status mappings for the built-in statuses: |No mapping by default, so http status is 200 |=== +[[reactive-health-indicators]] +==== ReactiveHealthIndicators +For reactive applications, such as those using Spring WebFlux, ReactiveHealthIndicators provide a +non-blocking contract for getting application health. Similar to traditional HealthIndicators, +health information is collected from all {sc-spring-boot-actuator}/health/ReactiveHealthIndicator.{sc-ext}[`ReactiveHealthIndicator`] +beans defined in your `ApplicationContext`. Spring Boot adds autoconfiguration for `RedisReactiveHealthIndicator`. +Regular HealthIndicators that do not check against a reactive API are executed on the elastic scheduler. +To provide custom health information from a reactive API, you can register Spring beans that implement the +{sc-spring-boot-actuator}/health/ReactiveHealthIndicator.{sc-ext}[`ReactiveHealthIndicator`] interface. +The following code shows a sample `ReactiveHealthIndicator` implementation: + +[source,java,indent=0] +---- + @Component + public class MyReactiveHealthIndicator implements ReactiveHealthIndicator { + + @Override + public Mono health() { + return doHealthCheck() //perform some specific health check that returns a Mono + .onErrorResume(ex -> Mono.just(new Health.Builder().down(ex).build()))); + } + + } +---- [[production-ready-application-info]] === Application Information