From 20e19b4242f888aafe3c55f9dabe3af46728cbab Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 31 Oct 2017 01:32:13 +0300 Subject: gradle: farm configuration --- juick-api/build.gradle | 2 +- .../main/java/com/juick/api/configuration/ApiAppConfiguration.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'juick-api') diff --git a/juick-api/build.gradle b/juick-api/build.gradle index 2d80576f..608d4afb 100644 --- a/juick-api/build.gradle +++ b/juick-api/build.gradle @@ -32,7 +32,7 @@ compileJava.options.encoding = 'UTF-8' gretty { httpPort = 8080 - contextPath = '/' + contextPath = '/api' servletContainer = 'tomcat8' } diff --git a/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java b/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java index c78ea51a..f51528bf 100644 --- a/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java +++ b/juick-api/src/main/java/com/juick/api/configuration/ApiAppConfiguration.java @@ -22,6 +22,7 @@ import com.juick.api.TelegramBotManager; import com.juick.server.configuration.BaseWebConfiguration; import com.juick.service.ImagesService; import com.juick.service.ImagesServiceImpl; +import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.*; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; @@ -53,7 +54,8 @@ public class ApiAppConfiguration extends BaseWebConfiguration { @Inject TelegramBotManager telegramBotManager; - private static final String WS_URI = "wss://ws.juick.com/"; + @Value("${websocket_url:ws://localhost:8080/ws/}") + private String WS_URI; @Bean public WebSocketConnectionManager connectionManager() { -- cgit v1.2.3