aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/src/main/java/com/juick/ws/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-01-17 16:16:16 +0300
committerGravatar Vitaly Takmazov2017-01-17 16:16:16 +0300
commite901d21f98f9beb34d3322bf1f1902dd76343295 (patch)
tree4f0fd4bc5a19919756bd0ebc50f0e2548ba4d672 /juick-ws/src/main/java/com/juick/ws/configuration
parente39440a08a194eeb1a3e9513037d6bd3f4b8a3e1 (diff)
drop juick-console, add protocol handler to juick-ws
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) {