diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index e42a8259c6..defbf0d659 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -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(); } }