- return new ChatHome(chatHomeService, storageStrategy.readChatrooms());
- }
-
- @Bean
- public StorageStrategy storageStrategy(
- ChatBackendProperties properties,
- ObjectMapper mapper,
- InMemoryChatHomeService chatHomeService)
- {
- return new LocalJsonFilesStorageStrategy(
- Paths.get(properties.getDatadir()),
- mapper,
- chatHomeService);
- }
-
- @Bean
- InMemoryChatHomeService chatHomeService(ChatBackendProperties properties)
- {
- return new InMemoryChatHomeService(properties.getChatroomBufferSize());