mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
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:
parent
788b69d98d
commit
aa43f5e037
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user