When I use a dynamic data source, the DataSourceHealthContributorAutoConfiguration class does not meet my requirements. It shows unknown instead of up. I need to know the status of each node. Plz ignore my crappy English level.

   static class RoutingDataSourceHealthIndicator extends AbstractHealthIndicator {

    @Override
    protected void doHealthCheck(Builder builder) throws Exception {
        builder.unknown().withDetail("routing", true);
    }

}

Comment From: wilkinsona

@hhtqaq There's nothing crappy about your English level as far as I can tell.

There's no accessor for the data sources that are used by an AbstractRoutingDataSources so we can't automatically include the status of each of them. Instead, we recommend that you define a bean for each DataSource that the AbstractRoutingDataSource uses. Each will then have its own health indicator. In 2.4, we've made an enhancement so that you can then configure the routing data source to be ignored.