added @RequestScoped

This commit is contained in:
Francesco Mangiacrapa 2024-10-17 12:24:18 +02:00
parent d96e22aab7
commit 957b26ad25
2 changed files with 14 additions and 5 deletions

View File

@ -155,17 +155,22 @@
</dependency> <dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api</artifactId> </dependency> <dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api</artifactId>
<scope>test</scope> </dependency> --> <scope>test</scope> </dependency> -->
<!-- <dependency> --> <!-- <dependency> -->
<!-- <groupId>org.eclipse.microprofile.health</groupId> --> <!-- <groupId>org.eclipse.microprofile.health</groupId> -->
<!-- <artifactId>microprofile-health-api</artifactId> --> <!-- <artifactId>microprofile-health-api</artifactId> -->
<!-- <version>2.2</version> --> <!-- <version>2.2</version> -->
<!-- </dependency> --> <!-- </dependency> -->
<dependency> <dependency>
<groupId>io.smallrye</groupId> <groupId>io.smallrye</groupId>
<artifactId>smallrye-health</artifactId> <artifactId>smallrye-health</artifactId>
<version>2.2.6</version> <version>2.2.6</version>
</dependency> </dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-health-extension-api</artifactId>
<version>2.2.6</version>
</dependency>
<!-- Plugins related tests --> <!-- Plugins related tests -->

View File

@ -11,15 +11,19 @@ import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.HealthCheckResponseBuilder; import org.eclipse.microprofile.health.HealthCheckResponseBuilder;
import org.eclipse.microprofile.health.Liveness; import org.eclipse.microprofile.health.Liveness;
import org.eclipse.microprofile.health.Readiness;
import org.gcube.application.cms.implementations.ImplementationProvider; import org.gcube.application.cms.implementations.ImplementationProvider;
import org.gcube.application.geoportal.common.model.configuration.MongoConnection; import org.gcube.application.geoportal.common.model.configuration.MongoConnection;
import org.gcube.application.geoportal.service.model.internal.db.Mongo; import org.gcube.application.geoportal.service.model.internal.db.Mongo;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.glassfish.jersey.process.internal.RequestScoped;
import com.mongodb.client.MongoIterable; import com.mongodb.client.MongoIterable;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@RequestScoped
@Readiness
@Path("/health") @Path("/health")
@Slf4j @Slf4j
public class GeoportalHealthCheck implements HealthCheck { public class GeoportalHealthCheck implements HealthCheck {