I am using SpringBoot Actuator to return health of the app.
public class HealthMonitor implements HealthIndicator {
@Override
public Health health() {
int errorCode = check();
if (errorCode != 0) {
return Health.down().withDetail("Error Code", errorCode).build();
}
return Health.up().build();
}
public int check() {
return 0;
}
}
I see the below response
{
"status": "UP",
"diskSpace": {
"status": "UP",
"free": 55020113920,
"threshold": 10485760
},
"db": {
"status": "UP",
"database": "Oracle",
"hello": "Hello"
}
}
I want to return a response similar to below
{status: "Healthy"}
Is there a way to do it?