TMP
authorKai Moritz <kai@juplo.de>
Fri, 23 Feb 2024 11:38:34 +0000 (12:38 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 23 Feb 2024 15:13:05 +0000 (16:13 +0100)
src/main/java/de/juplo/kafka/chat/backend/storage/nostorage/NoStorageStorageConfiguration.java
src/test/java/de/juplo/kafka/chat/backend/MongoDbStorageNotActiveConfiguration.java [new file with mode: 0644]
src/test/java/de/juplo/kafka/chat/backend/storage/mongodb/MongoDbStorageNotActiveConfiguration.java [deleted file]

index a893e9d..d497d95 100644 (file)
@@ -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 (file)
index 0000000..47d4c7d
--- /dev/null
@@ -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 (file)
index fae8cc9..0000000
+++ /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";
-  }
-}