From 0f5a68660d4a37ffc1007b7ac851f4f2f0732160 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Wed, 24 Apr 2024 08:41:47 +0200 Subject: refactor: move method content and call this method --- .../dnpm/etl/processor/config/AppConfiguration.kt | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfiguration.kt b/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfiguration.kt index 2970b4d..b7b150d 100644 --- a/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfiguration.kt +++ b/src/main/kotlin/dev/dnpm/etl/processor/config/AppConfiguration.kt @@ -88,19 +88,6 @@ class AppConfiguration { @ConditionalOnProperty(value = ["app.pseudonymize.generator"], havingValue = "GPAS") @Bean fun gpasPseudonymGenerator(configProperties: GPasConfigProperties, retryTemplate: RetryTemplate, restTemplate: RestTemplate): Generator { - return GpasPseudonymGenerator(configProperties, retryTemplate, restTemplate) - } - - @ConditionalOnProperty(value = ["app.pseudonymize.generator"], havingValue = "BUILDIN", matchIfMissing = true) - @Bean - fun buildinPseudonymGenerator(): Generator { - return AnonymizingGenerator() - } - - @ConditionalOnProperty(value = ["app.pseudonymizer"], havingValue = "GPAS") - @ConditionalOnMissingBean - @Bean - fun gpasPseudonymGeneratorOnDeprecatedProperty(configProperties: GPasConfigProperties, retryTemplate: RetryTemplate, restTemplate: RestTemplate): Generator { fun getSslContext(certificateLocation: String): SSLContext? { val ks = KeyStore.getInstance(KeyStore.getDefaultType()) @@ -164,6 +151,19 @@ class AppConfiguration { return GpasPseudonymGenerator(configProperties, retryTemplate, restTemplate) } + @ConditionalOnProperty(value = ["app.pseudonymize.generator"], havingValue = "BUILDIN", matchIfMissing = true) + @Bean + fun buildinPseudonymGenerator(): Generator { + return AnonymizingGenerator() + } + + @ConditionalOnProperty(value = ["app.pseudonymizer"], havingValue = "GPAS") + @ConditionalOnMissingBean + @Bean + fun gpasPseudonymGeneratorOnDeprecatedProperty(configProperties: GPasConfigProperties, retryTemplate: RetryTemplate, restTemplate: RestTemplate): Generator { + return gpasPseudonymGenerator(configProperties, retryTemplate, restTemplate) + } + @ConditionalOnProperty(value = ["app.pseudonymizer"], havingValue = "BUILDIN") @ConditionalOnMissingBean @Bean -- cgit v1.2.3