From: Kai Moritz Date: Fri, 23 Feb 2024 11:01:43 +0000 (+0100) Subject: TMP X-Git-Tag: rebase--2024-02-23--16-28~13 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b593120ed7b002e354e2dab069c8652491cb55d0;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 dc2bdfcc..e27b298b 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 @@ -16,11 +16,6 @@ import org.springframework.context.annotation.Configuration; havingValue = "none", matchIfMissing = true) @Configuration -@EnableAutoConfiguration( - exclude = { - MongoReactiveDataAutoConfiguration.class, - MongoReactiveRepositoriesAutoConfiguration.class, - MongoAutoConfiguration.class }) public class NoStorageStorageConfiguration { @Bean @@ -28,4 +23,19 @@ public class NoStorageStorageConfiguration { return new NoStorageStorageStrategy(); } + + @Configuration + @EnableAutoConfiguration( + exclude = { + MongoReactiveDataAutoConfiguration.class, + MongoReactiveRepositoriesAutoConfiguration.class, + MongoAutoConfiguration.class }) + public static class DisableMongoConfiguration + { + @Bean + public String foo() + { + return "FOO"; + } + } } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e69de29b..98b2266e 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -0,0 +1 @@ +debug: true 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 index b3d69edb..81d7af9a 100644 --- 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 @@ -18,8 +18,6 @@ import org.springframework.context.annotation.Configuration; import java.util.List; -@AutoConfigureBefore(MongoReactiveAutoConfiguration.class) -@ConditionalOnExpression("#{${chat.backend.inmemory.storage-strategy} != 'mongodb'}") @Configuration public class MongoDbStorageNotActiveConfiguration {