Class CompositeHealthContributorConfiguration<I extends HealthIndicator, B>

java.lang.Object
org.springframework.boot.health.autoconfigure.contributor.CompositeHealthContributorConfiguration<I,B>
Type Parameters:
I - the health indicator type
B - the bean type

public abstract class CompositeHealthContributorConfiguration<I extends HealthIndicator, B> extends Object
Base class for health contributor configurations that can combine source beans into a composite.
Since:
4.0.0
  • Constructor Details

    • CompositeHealthContributorConfiguration

      public CompositeHealthContributorConfiguration(Function<B,I> indicatorFactory)
      Creates a CompositeHealthContributorConfiguration that will use the given indicatorFactory to create HealthIndicator instances.
      Parameters:
      indicatorFactory - the function to create health indicator instances
  • Method Details

    • createComposite

      protected final HealthContributor createComposite(Map<String,B> beans)
    • createContributor

      protected final HealthContributor createContributor(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory, Class<B> beanType)
      Creates a composite contributor from the beans of the given beanType retrieved from the given beanFactory.
      Parameters:
      beanFactory - the bean factory from which the beans are retrieved
      beanType - the type of the beans that are retrieved
      Returns:
      the contributor
    • createContributor

      protected final HealthContributor createContributor(Map<String,B> beans)
    • createIndicator

      protected I createIndicator(B bean)