X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Fkafka%2Fchat%2Fbackend%2FChatBackendConfiguration.java;h=dcf2d9f3585e8c12fda57f550b6876415e7e2be0;hb=182a9d3c21cc4a091290a6b616bbec25b7d2d25a;hp=c4a36e3235a59c0af29c9f45640e87219607b2b7;hpb=5970768c9609c7b2b0bd087cef2a88db2eb60752;p=demos%2Fkafka%2Fchat diff --git a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java index c4a36e32..dcf2d9f3 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java +++ b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java @@ -4,8 +4,9 @@ import de.juplo.kafka.chat.backend.domain.ChatHome; import com.fasterxml.jackson.databind.ObjectMapper; import de.juplo.kafka.chat.backend.domain.ChatHomeService; import de.juplo.kafka.chat.backend.persistence.inmemory.InMemoryChatHomeService; -import de.juplo.kafka.chat.backend.persistence.filestorage.FileStorageStrategy; +import de.juplo.kafka.chat.backend.persistence.storage.files.FilesStorageStrategy; import de.juplo.kafka.chat.backend.persistence.StorageStrategy; +import de.juplo.kafka.chat.backend.persistence.inmemory.InMemoryChatRoomService; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -42,10 +43,11 @@ public class ChatBackendConfiguration Clock clock, ObjectMapper mapper) { - return new FileStorageStrategy( + return new FilesStorageStrategy( Paths.get(properties.getStorageDirectory()), clock, properties.getChatroomBufferSize(), + messageFlux -> new InMemoryChatRoomService(messageFlux), mapper); }