aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/src/main/java/com/juick/ws/configuration
diff options
context:
space:
mode:
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.java7
1 files changed, 7 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 e0a31b13..b7e0e658 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
@@ -1,8 +1,10 @@
package com.juick.ws.configuration;
+import com.juick.server.protocol.JuickProtocol;
import com.juick.ws.WebsocketComponent;
import com.juick.ws.XMPPConnection;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
@@ -19,6 +21,7 @@ import javax.inject.Inject;
* Created by aalexeev on 11/24/16.
*/
@Configuration
+@ComponentScan(basePackages = {"com.juick.server.protocol"})
@EnableScheduling
@EnableWebSocket
@PropertySource("classpath:juick.conf")
@@ -35,6 +38,10 @@ class WebsocketConfiguration implements WebSocketConfigurer {
public XMPPConnection ws() {
return new XMPPConnection(env, wsHandler());
}
+ @Bean
+ public JuickProtocol protocol() {
+ return new JuickProtocol("https://juick.com/");
+ }
@Override
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {