From fb58da1b5da4d802a9a4305c74f6c1090ba925f6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 21 Sep 2018 09:11:19 +0300 Subject: add TaskScheduler --- .../components/configuration/JuickServerWebsocketConfiguration.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-notifications/src/main') diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java index bc7f59fb..c35dfc7d 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/JuickServerWebsocketConfiguration.java @@ -14,7 +14,9 @@ import org.springframework.http.ResponseEntity; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.InterceptingClientHttpRequestFactory; import org.springframework.http.client.support.BasicAuthorizationInterceptor; +import org.springframework.scheduling.TaskScheduler; import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import org.springframework.web.socket.client.WebSocketConnectionManager; @@ -67,4 +69,8 @@ public class JuickServerWebsocketConfiguration { public StandardWebSocketClient client() { return new StandardWebSocketClient(); } + @Bean + public TaskScheduler taskScheduler() { + return new ConcurrentTaskScheduler(); + } } -- cgit v1.2.3