Skip to content

Commit c9b9201

Browse files
ericdahlizeye
authored andcommitted
Update custom HealthIndicator documentation
Update the custom HealthIndicator documentation to use the build() method rather than the old mechanism. Fixes spring-projectsgh-2270
1 parent 088411c commit c9b9201

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)