diff options
author | 2018-04-03 12:47:29 +0300 | |
---|---|---|
committer | 2018-04-03 12:47:29 +0300 | |
commit | d2af7ac0bbdde07e0f0f8b68c56f370ed3c06fe6 (patch) | |
tree | 9a8673c44f97e98b60b48c0c956b87ddc835e90b /juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java | |
parent | ed3af3b4a2722d352f5e9cfaf54fb44fa6af8295 (diff) |
boot: reuse single xmpp connection when possible
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java index 0fc86e2a..c8efc9e9 100644 --- a/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java +++ b/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java @@ -4,6 +4,7 @@ import com.juick.Message; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import rocks.xmpp.core.XmppException; @@ -26,6 +27,7 @@ public class XMPPConfiguration { @Value("${xmpp_disabled:false}") private boolean isXmppDisabled; @Bean + @ConditionalOnMissingBean(type = "rocks.xmpp.extensions.component.accept.ExternalComponent") public ExternalComponent xmpp() { XmppSessionConfiguration configuration = XmppSessionConfiguration.builder() .extensions(Extension.of(Message.class)) |