import jakarta.annotation.PreDestroy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
+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.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
+import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.config.CorsRegistry;
import org.springframework.web.reactive.config.WebFluxConfigurer;
.subscribe();
}
+ @ConditionalOnExpression("!'${chat.backend.inmemory.storage-strategy}'.toLowerCase().equals('mongodb')")
+ @Configuration
+ @EnableAutoConfiguration(exclude = {
+ MongoReactiveDataAutoConfiguration.class,
+ MongoReactiveAutoConfiguration.class,
+ MongoReactiveRepositoriesAutoConfiguration.class,
+ MongoAutoConfiguration.class })
+ public static class DisableMongoDBConfiguration
+ {
+ }
+
public static void main(String[] args)
{
SpringApplication.run(ChatBackendApplication.class, args);
+++ /dev/null
-package de.juplo.kafka.chat.backend.storage.mongodb;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
-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.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
-import org.springframework.context.annotation.Configuration;
-
-
-@ConditionalOnExpression("!'${chat.backend.inmemory.storage-strategy}'.toLowerCase().equals('mongodb')")
-@Configuration
-@Slf4j
-public class MongoDbStorageNotActiveConfiguration
-{
- @Configuration
- @EnableAutoConfiguration(exclude = {
- MongoReactiveDataAutoConfiguration.class,
- MongoReactiveAutoConfiguration.class,
- MongoReactiveRepositoriesAutoConfiguration.class,
- MongoAutoConfiguration.class })
- public static class DisableMongoDBConfiguration
- {
- }
-}