diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml index cb19603..3c97e63 100644 --- a/geoportal-service/pom.xml +++ b/geoportal-service/pom.xml @@ -155,17 +155,22 @@ javax.xml.ws jaxws-api test --> - - - - - + + + + + io.smallrye smallrye-health 2.2.6 + + io.smallrye + smallrye-health-extension-api + 2.2.6 + diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java index 14eb106..caa8bd8 100644 --- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java +++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealthCheck.java @@ -11,15 +11,19 @@ import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.HealthCheckResponseBuilder; import org.eclipse.microprofile.health.Liveness; +import org.eclipse.microprofile.health.Readiness; import org.gcube.application.cms.implementations.ImplementationProvider; import org.gcube.application.geoportal.common.model.configuration.MongoConnection; import org.gcube.application.geoportal.service.model.internal.db.Mongo; import org.gcube.common.scope.api.ScopeProvider; +import org.glassfish.jersey.process.internal.RequestScoped; import com.mongodb.client.MongoIterable; import lombok.extern.slf4j.Slf4j; +@RequestScoped +@Readiness @Path("/health") @Slf4j public class GeoportalHealthCheck implements HealthCheck {