From f9aa09880d6d7698a23303a969a0f8c129f1df03 Mon Sep 17 00:00:00 2001 From: markostreich Date: Mon, 17 Jun 2024 12:42:08 +0200 Subject: [PATCH] Fix/1442 domain specific s3 in engine (#1769) * 1442 fix usage of domain specific s3 in engine * Revert "1442 fix usage of domain specific s3 in engine" This reverts commit b3a504a0b791258daf0b35479892249b62788cfd. * 1442 fix order of configurations * 1442 remove redundant configuration * 1442 remove redundant import --- .../oss/digiwf/shared/file/S3Configuration.java | 3 +-- .../S3IntegrationClientAutoConfiguration.java | 11 ++++++++--- .../src/main/resources/application.yml | 9 --------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/shared/file/S3Configuration.java b/digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/shared/file/S3Configuration.java index a16e87433..651946a16 100644 --- a/digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/shared/file/S3Configuration.java +++ b/digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/shared/file/S3Configuration.java @@ -6,7 +6,6 @@ import de.muenchen.oss.digiwf.s3.integration.client.service.S3DomainProvider; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; @@ -17,8 +16,8 @@ * @author martin.dietrich */ @Configuration -@ComponentScan(basePackages = { "de.muenchen.oss.digiwf.s3.integration.client" }) public class S3Configuration { + /** * Provides the {@link RestTemplate} which is used in {@link ApiClient}. * diff --git a/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-client-starter/src/main/java/de/muenchen/oss/digiwf/s3/integration/client/configuration/S3IntegrationClientAutoConfiguration.java b/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-client-starter/src/main/java/de/muenchen/oss/digiwf/s3/integration/client/configuration/S3IntegrationClientAutoConfiguration.java index 043e66f9a..2ed50ccdf 100644 --- a/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-client-starter/src/main/java/de/muenchen/oss/digiwf/s3/integration/client/configuration/S3IntegrationClientAutoConfiguration.java +++ b/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-client-starter/src/main/java/de/muenchen/oss/digiwf/s3/integration/client/configuration/S3IntegrationClientAutoConfiguration.java @@ -116,10 +116,10 @@ public FileExtensionService fileExtensionValidationFromS3IntegrationClientProper } /** - * Instance of an {@link S3StorageUrlProvider} containing an externally created {@link S3DomainProvider} for retrieving S + * Instance of an {@link S3StorageUrlProvider} containing an externally created {@link S3DomainProvider} for retrieving the S3 storage URL. * - * @param s3DomainProvider - * @return + * @param s3DomainProvider Provider of domain specific S3 storages configured in process configurations. + * @return Provider of the S3 storage URL. */ @Bean @ConditionalOnBean(S3DomainProvider.class) @@ -127,6 +127,11 @@ public S3StorageUrlProvider s3StorageUrlProvider(final S3DomainProvider s3Domain return new S3StorageUrlProvider(s3DomainProvider, this.s3IntegrationClientProperties.getDocumentStorageUrl()); } + /** + * Instance of an {@link S3StorageUrlProvider} containing a default {@link S3DomainProvider}. The instance will only return the default S3 URL. + * + * @return Provider of the S3 storage URL. + */ @Bean @ConditionalOnMissingBean(S3DomainProvider.class) public S3StorageUrlProvider s3StorageUrlProviderWithoutDomainProvider() { diff --git a/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-service/src/main/resources/application.yml b/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-service/src/main/resources/application.yml index 2312c3f4f..4c58aa06f 100644 --- a/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-service/src/main/resources/application.yml +++ b/digiwf-integrations/digiwf-s3-integration/digiwf-s3-integration-service/src/main/resources/application.yml @@ -32,15 +32,6 @@ spring: sendMessage-out-0: destination: dwf-connector-${DIGIWF_ENV} -de: - muenchen: - oss: - digiwf: - s3: - client: - document-storage-url: "${DOCUMENT_STORAGE_HOST:http://localhost}:${DOCUMENT_STORAGE_PORT:8080}" - enable-security: false - io: muenchendigital: digiwf: