1 package de.juplo.kafka.chat.backend.persistence.storage.nostorage;
3 import de.juplo.kafka.chat.backend.domain.ChatRoomData;
4 import de.juplo.kafka.chat.backend.domain.ChatRoomInfo;
5 import de.juplo.kafka.chat.backend.persistence.StorageStrategy;
6 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
7 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
8 import org.springframework.boot.autoconfigure.data.mongo.MongoRepositoriesAutoConfiguration;
9 import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
10 import org.springframework.context.annotation.Bean;
11 import org.springframework.context.annotation.Configuration;
12 import reactor.core.publisher.Flux;
15 @ConditionalOnProperty(
16 prefix = "chat.backend.inmemory",
17 name = "storage-strategy",
19 matchIfMissing = true)
21 @EnableAutoConfiguration(
23 MongoRepositoriesAutoConfiguration.class,
24 MongoAutoConfiguration.class })
25 public class NoStorageStorageConfiguration
28 public StorageStrategy storageStrategy()
30 return new StorageStrategy()
33 public void writeChatRoomInfo(Flux<ChatRoomInfo> chatRoomInfoFlux) {}
36 public Flux<ChatRoomInfo> readChatRoomInfo()
42 public void writeChatRoomData(Flux<ChatRoomData> chatRoomDataFlux) {}
45 public Flux<ChatRoomData> readChatRoomData()