Skip to content

Fix health indicator property names in docs#2915

Merged
ryanjbaxter merged 1 commit intospring-cloud:4.1.xfrom
cselagea:bugfix/health-indicator-props
Jun 18, 2025
Merged

Fix health indicator property names in docs#2915
ryanjbaxter merged 1 commit intospring-cloud:4.1.xfrom
cselagea:bugfix/health-indicator-props

Conversation

@cselagea
Copy link
Copy Markdown
Contributor

@cselagea cselagea commented Jun 18, 2025

Config Server health indicator is @ConditionalOnProperty("spring.cloud.config.server.health.enabled").

@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(AbstractHealthIndicator.class)
@ConditionalOnProperty(value = "spring.cloud.config.server.health.enabled", matchIfMissing = true)
protected static class ConfigServerActuatorConfiguration {
@Bean
public ConfigServerHealthIndicator configServerHealthIndicator(EnvironmentRepository repository,
ConfigServerProperties configServerProperties) {
return new ConfigServerHealthIndicator(repository, configServerProperties);
}
}

Config Client health indicator is @ConditionalOnEnabledHealthIndicator("config").

@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(HealthIndicator.class)
@ConditionalOnEnabledHealthIndicator("config")
protected static class ConfigServerHealthIndicatorConfiguration {
@Bean
public ConfigClientHealthProperties configClientHealthProperties() {
return new ConfigClientHealthProperties();
}
@Bean
public ConfigServerHealthIndicator clientConfigServerHealthIndicator(ConfigClientHealthProperties properties,
ConfigurableEnvironment environment) {
return new ConfigServerHealthIndicator(environment, properties);
}
}

Config Server health indicator is
`@ConditionalOnProperty("spring.cloud.config.server.health.enabled")`
and Config Client health indicator is
`@ConditionalOnEnabledHealthIndicator("config")`.

Signed-off-by: Cosmin Selagea-Popov <[email protected]>
@ryanjbaxter ryanjbaxter added this to the 4.1.7 milestone Jun 18, 2025
@ryanjbaxter ryanjbaxter merged commit 2587c80 into spring-cloud:4.1.x Jun 18, 2025
2 checks passed
@github-project-automation github-project-automation Bot moved this to Done in 2025.0.1 Jun 18, 2025
@github-project-automation github-project-automation Bot moved this to Done in 2023.0.6 Jun 18, 2025
@cselagea cselagea deleted the bugfix/health-indicator-props branch June 18, 2025 00:32
@spencergibb spencergibb moved this to Done in 2024.0.2 Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done
Status: Done
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants