fix_28276 #9

Merged
francesco.mangiacrapa merged 11 commits from fix_28276 into master 2024-10-16 11:11:33 +02:00
6 changed files with 180 additions and 20 deletions
Showing only changes of commit f8428995ce - Show all commits

View File

@ -30,6 +30,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

View File

@ -24,6 +24,17 @@
@ -71,6 +82,17 @@
@ -118,6 +140,17 @@
@ -165,6 +198,17 @@
@ -212,6 +256,17 @@
@ -234,6 +289,23 @@
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="geoportal-client-1.2.2.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-client/geoportal-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="geoportal-common-1.1.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/geoportal-common/geoportal-common">
<dependency-type>uses</dependency-type>
</dependent-module>
@ -306,6 +378,17 @@
@ -353,6 +436,17 @@
@ -400,6 +494,17 @@

View File

@ -0,0 +1,2 @@
boot.validation.initialized=true
eclipse.preferences.version=1

16
pom.xml
View File

@ -54,7 +54,8 @@
<properties>
<jersey.version>2.25.1</jersey.version>
<!-- Using 2.8.4 because storagehub-model.1.1.1 uses indirectly this version via jsersey-media-json -->
<!-- Using 2.8.4 because storagehub-model.1.1.1 uses indirectly this version
via jsersey-media-json -->
<jackson.version>2.8.4</jackson.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
@ -81,6 +82,19 @@
<artifactId>common-smartgears</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>1.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-smartgears-app</artifactId>

View File

@ -0,0 +1,31 @@
package org.gcube.datatransfer.resolver.services;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.PublicMetricsAutoConfiguration;
import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
import org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping;
import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@Import({ EndpointAutoConfiguration.class, PublicMetricsAutoConfiguration.class })
public class SpringBootActuatorConfig {
@Bean
@Autowired
public EndpointHandlerMapping endpointHandlerMapping(Collection<? extends MvcEndpoint> endpoints) {
return new EndpointHandlerMapping(endpoints);
}
@Bean
@Autowired
public EndpointMvcAdapter metricsEndPoint(MetricsEndpoint delegate) {
return new EndpointMvcAdapter(delegate);
}
}

View File

@ -63,7 +63,9 @@ public class RuntimeResourceReader {
ScopeProvider.instance.set(scope);
SimpleQuery query = queryFor(ServiceEndpoint.class);
if (platformName != null)
query.addCondition("$resource/Profile/Platform/Name/text() eq '" + platformName + "'");
if (category != null)
query.addCondition("$resource/Profile/Category/text() eq '" + category + "'");
if (endPoint != null && !endPoint.isEmpty())
query.addCondition("$resource/Profile/AccessPoint/Interface/Endpoint/text() eq '" + endPoint + "'");
@ -127,21 +129,22 @@ public class RuntimeResourceReader {
// String scope = "/pred4s/preprod/preVRE";
// String scope = "/d4science.research-infrastructures.eu/D4OS/GNA";
String scope = "/gcube/devsec/devVRE";
// String scope = "/gcube/devsec/devVRE";
String scope = "/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps";
// String scope = "/d4science.research-infrastructures.eu/gCubeApps/Esquiline";
// String scope = "/d4science.research-infrastructures.eu/D4OS/ARIADNEplus_Project";
// String platformName = "geonetwork";
// String category = "Gis";
// String platformName = "GeoServer";
// String category = "Gis";
String platformName = "GeoServer";
String category = null;
// String platformName = "postgis";
// String category = "Database";
String platformName = "postgres";
String category = "Database";
// String platformName = "postgres";
// String category = "Database";
// String platformName = "mongodb";
// String category = "Database";