Skip to content

Commit 161cb7a

Browse files
committed
Merge pull request spring-projects#2270 from ericdahl/docs-health-builder
* docs-health-builder: Update custom HealthIndicator documentation
2 parents 788b69d + aa43f5e commit 161cb7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ additional details to be displayed.
223223
public Health health() {
224224
int errorCode = check(); // perform some specific health check
225225
if (errorCode != 0) {
226-
return Health.down().withDetail("Error Code", errorCode);
226+
return Health.down().withDetail("Error Code", errorCode).build();
227227
}
228-
return Health.up();
228+
return Health.up().build();
229229
}
230230
231231
}

0 commit comments

Comments
 (0)