From 0a8da4fd7dccf7876d478cebd55ab7f678f4ef9c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Sat, 10 Apr 2021 10:44:08 +0100 Subject: [PATCH] Polish "Provide health for an AbstractRoutingDataSource's resolved targets" See gh-25708 --- .../DataSourceHealthContributorAutoConfiguration.java | 2 +- .../src/docs/asciidoc/production-ready-features.adoc | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthContributorAutoConfiguration.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthContributorAutoConfiguration.java index 9749864cc9..bd9c25f03f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthContributorAutoConfiguration.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/jdbc/DataSourceHealthContributorAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors. + * Copyright 2012-2021 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. diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc index a94d17173d..b2ec37d4f2 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc @@ -989,6 +989,15 @@ TIP: You can use `@Qualifier("groupname")` if you need to register custom `Statu +[[production-ready-health-datasource]] +==== DataSource Health +The `DataSource` health indicator shows the health of both standard data source and routing data source beans. +The health of a routing data source includes the health of each of its target data sources. +In the health endpoint's response, each of a routing data source's targets is named using its routing key. +If you prefer not to include routing data sources in the indicator's output, set configprop:management.health.db.ignore-routing-data-sources[] to `true`. + + + [[production-ready-kubernetes-probes]] === Kubernetes Probes Applications deployed on Kubernetes can provide information about their internal state with https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes[Container Probes].