From e901d21f98f9beb34d3322bf1f1902dd76343295 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 17 Jan 2017 16:16:16 +0300 Subject: drop juick-console, add protocol handler to juick-ws --- .../java/com/juick/ws/configuration/WebsocketConfiguration.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'juick-ws/src/main/java/com/juick/ws/configuration') 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) { -- cgit v1.2.3