Skip to content

Commit

Permalink
Fix/1442 domain specific s3 in engine (#1769)
Browse files Browse the repository at this point in the history
* 1442 fix usage of domain specific s3 in engine

* Revert "1442 fix usage of domain specific s3 in engine"

This reverts commit b3a504a.

* 1442 fix order of configurations

* 1442 remove redundant configuration

* 1442 remove redundant import
  • Loading branch information
markostreich authored Jun 17, 2024
1 parent 94de869 commit f9aa098
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,22 @@ 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)
public S3StorageUrlProvider s3StorageUrlProvider(final S3DomainProvider s3DomainProvider) {
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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f9aa098

Please sign in to comment.