From: Kai Moritz Date: Fri, 23 Feb 2024 11:38:34 +0000 (+0100) Subject: TMP X-Git-Tag: rebase--2024-02-23--16-28~10 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=61b5faf344d2acec2e4d8d438d1a2a2cd0c49299;p=demos%2Fkafka%2Fchat TMP --- diff --git a/src/main/java/de/juplo/kafka/chat/backend/storage/nostorage/NoStorageStorageConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/storage/nostorage/NoStorageStorageConfiguration.java index a893e9d7..d497d957 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/storage/nostorage/NoStorageStorageConfiguration.java +++ b/src/main/java/de/juplo/kafka/chat/backend/storage/nostorage/NoStorageStorageConfiguration.java @@ -1,6 +1,7 @@ package de.juplo.kafka.chat.backend.storage.nostorage; import de.juplo.kafka.chat.backend.implementation.StorageStrategy; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -13,6 +14,7 @@ import org.springframework.context.annotation.Lazy; havingValue = "none", matchIfMissing = true) @Configuration +@Slf4j public class NoStorageStorageConfiguration { @Bean @@ -25,6 +27,7 @@ public class NoStorageStorageConfiguration @Lazy(false) public String foo() { + log.info("FOO (woanders)!"); return "FOO"; } } diff --git a/src/test/java/de/juplo/kafka/chat/backend/MongoDbStorageNotActiveConfiguration.java b/src/test/java/de/juplo/kafka/chat/backend/MongoDbStorageNotActiveConfiguration.java new file mode 100644 index 00000000..47d4c7d8 --- /dev/null +++ b/src/test/java/de/juplo/kafka/chat/backend/MongoDbStorageNotActiveConfiguration.java @@ -0,0 +1,20 @@ +package de.juplo.kafka.chat.backend; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + + +@Configuration +@Slf4j +public class MongoDbStorageNotActiveConfiguration +{ + @Bean + @Lazy(false) + public String foo() + { + log.info("FOO!"); + return "FOO"; + } +} diff --git a/src/test/java/de/juplo/kafka/chat/backend/storage/mongodb/MongoDbStorageNotActiveConfiguration.java b/src/test/java/de/juplo/kafka/chat/backend/storage/mongodb/MongoDbStorageNotActiveConfiguration.java deleted file mode 100644 index fae8cc96..00000000 --- a/src/test/java/de/juplo/kafka/chat/backend/storage/mongodb/MongoDbStorageNotActiveConfiguration.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.juplo.kafka.chat.backend.storage.mongodb; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Lazy; - - -@Configuration -public class MongoDbStorageNotActiveConfiguration -{ - @Bean - @Lazy(false) - public String foo() - { - return "FOO"; - } -}