aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/configuration/XMPPConfig.java
blob: e1115c7e5affec24c6b108461e9a0bb69df4ab2f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.juick.server.configuration;

import com.juick.server.XMPPConnection;
import com.juick.server.XMPPServer;
import com.juick.server.xmpp.router.XMPPRouter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

@Configuration
@ConditionalOnProperty("xmppbot_jid")
public class XMPPConfig {
    @Bean
    public XMPPServer xmppServer() {
        return new XMPPServer();
    }
    @Bean
    public XMPPRouter xmppRouter() {
        return new XMPPRouter();
    }
    @Bean
    @DependsOn("xmppRouter")
    public XMPPConnection xmppConnection() {
        return new XMPPConnection();
    }
}