olahell olahell - 2 months ago 27
Java Question

spring-boot health not showing details (withDetail info)

I have written a class implementing HealthIndicator, overriding the health-method. I return

Health.down().withDetail("SupportServiceStatus", "UP").build();

This should make my
-endpoint return:

"applicationHealth": {

Instead it just returns (health, without details):


Javacode (somewhat simplified):

public class ApplicationHealth implements HealthIndicator {

public Health health() {
return check();

private Health check() {
return Health.up().withDetail("SupportServiceStatus", supportServiceStatusCode).build();



According to spring-boot docs:

. . . by default, only the health status is exposed over an unauthenticated HTTP connection. If you are happy for complete health information to always be exposed you can set endpoints.health.sensitive to false.

Solution is to set endpoints.health.sensitive to false in application.properties.