diff options
Diffstat (limited to 'juick-ws/src/main/java/com/juick/ws/configuration')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java index 92b61bc7..086ae4ce 100644 --- a/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java +++ b/juick-ws/src/main/java/com/juick/ws/configuration/WebsocketConfiguration.java @@ -3,6 +3,10 @@ package com.juick.ws.configuration; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.juick.ws.WebsocketComponent; +import com.juick.ws.XMPPConnection; +import com.juick.ws.components.CrosspostComponent; +import com.juick.ws.components.PushComponent; +import com.juick.ws.components.XMPPComponent; import com.mitchellbosecke.pebble.PebbleEngine; import com.mitchellbosecke.pebble.loader.Loader; import com.mitchellbosecke.pebble.loader.ServletLoader; @@ -41,6 +45,14 @@ import java.util.List; public class WebsocketConfiguration extends WebMvcConfigurationSupport implements WebSocketConfigurer { @Inject Environment env; + @Inject + XMPPComponent ws; + @Inject + CrosspostComponent crosspost; + @Inject + PushComponent push; + @Inject + XMPPConnection xmpp; @Bean WebsocketComponent wsHandler() { return new WebsocketComponent(); @@ -82,6 +94,30 @@ public class WebsocketConfiguration extends WebMvcConfigurationSupport implement viewResolver.setPebbleEngine(pebbleEngine()); return viewResolver; } + @Bean + public XMPPConnection ws() { + XMPPConnection ws = new XMPPConnection(); + ws.init(); + return ws; + } + @Bean + public XMPPComponent xmpp() { + XMPPComponent xmpp = new XMPPComponent(); + xmpp.init(); + return xmpp; + } + @Bean + public CrosspostComponent crosspost() { + CrosspostComponent crosspost = new CrosspostComponent(); + crosspost.init(); + return crosspost; + } + @Bean + public PushComponent push() { + PushComponent push = new PushComponent(); + push.init(); + return push; + } @Override public RequestMappingHandlerMapping requestMappingHandlerMapping() { |