@Bean @ConditionalOnMissingBean(AliveHealthEndpoint.class) @ConfigurationProperties("extended.health.alive") public AliveHealthEndpoint applicationAliveEndpoint() { return new AliveHealthEndpoint("alive", new OrderedHealthAggregator()); }
@Bean @ConditionalOnMissingBean(BasicHealthEndpoint.class) @ConfigurationProperties("extended.health.basic") public BasicHealthEndpoint basicHealthEndpoint() { return new BasicHealthEndpoint("basic", new OrderedHealthAggregator()); }
@Bean @ConditionalOnMissingBean(DetailHealthEndpoint.class) @ConfigurationProperties("extended.health.detail") public DetailHealthEndpoint detailHealthEndpoint() { return new DetailHealthEndpoint("detail", new OrderedHealthAggregator()); }
@Bean @ConditionalOnMissingBean public HealthEndpoint healthEndpoint() { return new HealthEndpoint( this.healthAggregator == null ? new OrderedHealthAggregator() : this.healthAggregator, this.healthIndicators == null ? Collections.<String, HealthIndicator>emptyMap() : this.healthIndicators); }
@Override public void afterBinderContextInitialized(String binderConfigurationName, ConfigurableApplicationContext binderContext) { if (this.bindersHealthIndicator != null) { OrderedHealthAggregator healthAggregator = new OrderedHealthAggregator(); Map<String, HealthIndicator> indicators = binderContext.getBeansOfType(HealthIndicator.class); // if there are no health indicators in the child context, we just mark // the binder's health as unknown // this can happen due to the fact that configuration is inherited HealthIndicator binderHealthIndicator = indicators.isEmpty() ? new DefaultHealthIndicator() : new CompositeHealthIndicator(healthAggregator, indicators); this.bindersHealthIndicator.addHealthIndicator(binderConfigurationName, binderHealthIndicator); } }
@Before public void setup() { healthAggregator = new OrderedHealthAggregator(); healthAggregator.setStatusOrder(DOWN, OUT_OF_SERVICE, UNKNOWN, new Status("DEGRADED"), UP); }
@Bean public HealthAggregator healthAggregator() { return new OrderedHealthAggregator(); }
@Bean @ConditionalOnMissingBean(name = "bindersHealthIndicator") public CompositeHealthIndicator bindersHealthIndicator() { return new CompositeHealthIndicator(new OrderedHealthAggregator()); }
@Bean public CompositeHealthIndicator testHealthIndicator1() { return new CompositeHealthIndicator(new OrderedHealthAggregator()); }
@Bean public CompositeHealthIndicator testHealthIndicator2() { return new CompositeHealthIndicator(new OrderedHealthAggregator()); }
@Before public void setUp() throws Exception { healthCheckHandler = new EurekaHealthCheckHandler(new OrderedHealthAggregator()); }
@Bean public DiscoveryCompositeHealthIndicator discoveryCompositeHealthIndicator(List<DiscoveryHealthIndicator> indicators) { return new DiscoveryCompositeHealthIndicator(new OrderedHealthAggregator(), indicators); }