TMP
[demos/kafka/chat] / src / main / java / de / juplo / kafka / chat / backend / storage / nostorage / NoStorageStorageConfiguration.java
index dc2bdfc..d497d95 100644 (file)
@@ -1,13 +1,11 @@
 package de.juplo.kafka.chat.backend.storage.nostorage;
 
 import de.juplo.kafka.chat.backend.implementation.StorageStrategy;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration;
-import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveRepositoriesAutoConfiguration;
-import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
 
 
 @ConditionalOnProperty(
@@ -16,11 +14,7 @@ import org.springframework.context.annotation.Configuration;
     havingValue = "none",
     matchIfMissing = true)
 @Configuration
-@EnableAutoConfiguration(
-    exclude = {
-        MongoReactiveDataAutoConfiguration.class,
-        MongoReactiveRepositoriesAutoConfiguration.class,
-        MongoAutoConfiguration.class })
+@Slf4j
 public class NoStorageStorageConfiguration
 {
   @Bean
@@ -28,4 +22,12 @@ public class NoStorageStorageConfiguration
   {
     return new NoStorageStorageStrategy();
   }
+
+  @Bean
+  @Lazy(false)
+  public String foo()
+  {
+    log.info("FOO (woanders)!");
+    return "FOO";
+  }
 }