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(); } }