From 9834bb6f42e46ae54873081614a15a7b04788bc3 Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Mon, 28 Aug 2023 14:29:53 +0200 Subject: [PATCH] fix: removed outdated attributes from edcadapterservice --- DEPENDENCIES_BACKEND | 1 + .../edc/logic/service/EdcAdapterService.java | 13 --------- .../src/main/resources/application.properties | 29 +++++++++++-------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/DEPENDENCIES_BACKEND b/DEPENDENCIES_BACKEND index 89b5e657..8a7382b8 100644 --- a/DEPENDENCIES_BACKEND +++ b/DEPENDENCIES_BACKEND @@ -73,3 +73,4 @@ maven/mavencentral/org.springframework/spring-webmvc/6.0.4, Apache-2.0, approved maven/mavencentral/org.webjars/swagger-ui/4.18.2, Apache-2.0, approved, #7850 maven/mavencentral/org.yaml/snakeyaml/1.33, Apache-2.0, approved, clearlydefined + diff --git a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java index 5267cd00..078ed1c4 100644 --- a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java +++ b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java @@ -65,27 +65,15 @@ public class EdcAdapterService { @Value("${edc.controlplane.data.port}") private Integer dataPort; - @Value("${edc.backend.url}") - private String backendUrl; - @Value("${edc.controlplane.key}") private String edcApiKey; @Value("${server.port}") private String serverPort; - @Value("${edc.dataplane.public.port}") - private String dataplanePort; - @Value("${minikube.ip}") private String minikubeIp; - @Value("${request.serverendpoint}") - private String requestServerEndpointURL; - - @Value("${response.serverendpoint}") - private String responseServerEndpointURL; - private ObjectMapper objectMapper; @Autowired @@ -504,7 +492,6 @@ public String[] getContractForResponseApi(String partnerIdsUrl) { */ public String[] getContractForRequestOrResponseApiApi(String partnerIdsUrl, Map filter) { try { - // String catalog = getCatalog(partnerIdsUrl, Optional.of(filter)); JsonNode objectNode = getCatalogFilteredByAssetPropertyObjectFilter(partnerIdsUrl, filter); JsonNode contractOffer = objectNode.get("contractOffers").get(0); String assetApi = contractOffer.get("asset").get("id").asText(); diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index ea4ed486..fa64df6b 100755 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -1,6 +1,6 @@ # Server Config server.port=${SERVER_PORT:8081} -my.base.url=http://localhost +my.base.url=http://host.minikube.internal request.serverendpoint=${my.base.url}:${server.port}/catena/product-stock/request request.apiassetid=product-stock-request-api response.serverendpoint=${my.base.url}:${server.port}/catena/product-stock/response @@ -12,30 +12,33 @@ spring.datasource.url=${DATASOURCE_URL:jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1} spring.datasource.username=${DATASOURCE_USERNAME:sa} spring.datasource.password=${DATASOURCE_PASSWORD:} spring.jpa.hibernate.ddl-auto=create - # API Root server.servlet.context-path=${API_ROOTDIR:/catena} - # EDC Config -edc.controlplane.host=${EDC_CONTROLPLANE_HOST:172.17.0.2} -edc.controlplane.data.port=${EDC_CONTROLPLANE_DATA_PORT:31960} +edc.controlplane.host=${EDC_CONTROLPLANE_HOST:192.168.49.2} +edc.controlplane.data.port=${EDC_CONTROLPLANE_DATA_PORT:31944} edc.controlplane.key=${EDC_CONTROLPLANE_KEY:password} -edc.backend.url=${EDC_BACKEND_URL:http://172.17.0.2:31048} -minikube.ip=${MINIKUBE_IP:host.minikube.internal} edc.applydataplaneworkaround=true -edc.dataplane.public.port=30784 - +edc.dataplane.public.port=30703 +minikube.ip=${MINIKUBE_IP:host.minikube.internal} # Jackson (JSON) #spring.jackson.default-property-inclusion=non_empty #logging.level.org.hibernate.SQL=DEBUG #logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true + # Own EDC-IDS-URL -edc.idsUrl=${EDC_IDSURL:http://plato-controlplane:8084/api/v1/ids} -own.bpnl=${OWN_BPNL:BPNL1234567890ZZ} -own.bpns=${OWN_BPNS:BPNS1234567890ZZ} +edc.idsUrl=${EDC_IDSURL:http://sokrates-controlplane:8084/api/v1/ids} +own.bpnl=${OWN_BPNL:BPNL4444444444XX} +own.name=${OWN_NAME:Scenario Customer} +own.default.bpns=${OWN_BPNS:BPNS4444444444XY} +own.default.site.name=${OWN_SITE:Hauptwerk Musterhausen} +own.default.bpna=${OWN_BPNS:BPNA4444444444ZZ} +own.default.streetandnumber=${OWN_STREETANDNUMBER:Musterstrasse 35b} +own.default.zipcodeandcity=${OWN_ZIPCODEANDCITY:77777 Musterhausen} +own.default.country=${OWN_COUNTRY:Germany} # The number of minutes before received authentication data # in the context of a consumer pull is removed from memory @@ -43,3 +46,5 @@ own.edr.deletiontimer=2 puris.apiversion=1.0.0 puris.demonstrator.role=customer +# run with: +# mvn spring-boot:run -Dspring-boot.run.arguments=--spring.profiles.active=customer