import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Liveness;
import javax.enterprise.context.ApplicationScoped;
@Liveness
@ApplicationScoped
public class HealthTest implements HealthCheck {
@Override
public HealthCheckResponse call() {
return HealthCheckResponse.named("health-test").up().build();
}
}
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Liveness;
import javax.enterprise.context.ApplicationScoped;
@Liveness
@ApplicationScoped
public class HealthTest implements HealthCheck {
@Override
public HealthCheckResponse call() {
return HealthCheckResponse.named("health-test").up().build();
}
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
/subsystem=microprofile-health-smallrye:check
{
"outcome" => "success",
"result" => {
"outcome" => "UP",
"checks" => [{
"name" => "health-test",
"state" => "UP"
}]
}
}
/subsystem=microprofile-health-smallrye:check
{
"outcome" => "success",
"result" => {
"outcome" => "UP",
"checks" => [{
"name" => "health-test",
"state" => "UP"
}]
}
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow