Update custom HealthIndicator documentation

Update the custom HealthIndicator documentation to use the build()
method rather than the old mechanism.

Fixes gh-2270
This commit is contained in:
Eric Dahl 2014-12-31 17:46:59 -08:00 committed by Phillip Webb
parent 788b69d98d
commit aa43f5e037

View File

@ -223,9 +223,9 @@ additional details to be displayed.
public Health health() {
int errorCode = check(); // perform some specific health check
if (errorCode != 0) {
return Health.down().withDetail("Error Code", errorCode);
return Health.down().withDetail("Error Code", errorCode).build();
}
return Health.up();
return Health.up().build();
}
}