shikeyin
2024-01-17 5be90b09bd999cd380cf13acbbf09ed7246a9cc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.iplatform.chat.config;
 
import com.iplatform.chat.ChatService;
import com.iplatform.chat.support.DatabaseChatService;
import com.iplatform.core.PlatformConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
@Configuration
@ConditionalOnProperty(prefix = "iplatform.chat", name = "mongo-enabled", havingValue = "false", matchIfMissing = true)
public class SimpleChatConfig extends PlatformConfiguration {
 
    @Bean
    public ChatService chatService(){
        DatabaseChatService chatService = new DatabaseChatService();
        return chatService;
    }
}