Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/src/main/asciidoc/microprofile-health.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class SimpleHealthCheck implements HealthCheck {

@Override
public HealthCheckResponse call() {
return HealthCheckResponse.named("Simple health check").up().build();
return HealthCheckResponse.up("Simple health check");
}
}
----
Expand Down Expand Up @@ -156,7 +156,7 @@ public class DatabaseConnectionHealthCheck implements HealthCheck {

@Override
public HealthCheckResponse call() {
return HealthCheckResponse.named("Database connection health check").up().build();
return HealthCheckResponse.up("Database connection health check");
}
}

Expand Down Expand Up @@ -229,6 +229,12 @@ public class DatabaseConnectionHealthCheck implements HealthCheck {
}
----

NOTE: Until now we used a simplified method of building a `HealthCheckResponse`
through the `HealthCheckResponse#up(String)` (there is also
`HealthCheckResponse#down(String)`) which will directly build the response object.
From now on, we utilize the full builder capabilities provided by the
`HealthCheckResponseBuilder` class.

If you now rerun the readiness health check (at `http://localhost:8080/health/ready`)
the overall `status` should be DOWN. You can also check the liveness check at
`http://localhost:8080/health/live` which will return the overall `status` UP because
Expand Down