From c83e39441243b7db8293f1c161ee203faaf360ef Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 15 Dec 2016 10:34:18 +0300 Subject: juick-notifications: RestService and GCM cleanup --- .../components/configuration/NotificationsAppConfiguration.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'juick-notifications/src/main/java/com/juick/components/configuration') diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java index 67a551c4..452cf61c 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java @@ -1,15 +1,18 @@ package com.juick.components.configuration; +import com.juick.components.CleanUp; import com.juick.components.Notifications; import com.notnoop.apns.APNS; import com.notnoop.apns.ApnsService; 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; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.InterceptingClientHttpRequestFactory; import org.springframework.http.client.support.BasicAuthorizationInterceptor; +import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.web.client.RestTemplate; import javax.inject.Inject; @@ -20,7 +23,9 @@ import java.util.List; * Created by aalexeev on 11/12/16. */ @Configuration +@EnableScheduling @PropertySource("classpath:juick.conf") +@ComponentScan(basePackages = {"com.juick.components.service"}) public class NotificationsAppConfiguration { @Inject private Environment env; @@ -47,4 +52,8 @@ public class NotificationsAppConfiguration { return APNS.newService().withCert(env.getProperty("ios_pkcs12_file"), env.getProperty("ios_pkcs12_password")) .withSandboxDestination().build(); } + @Bean + public CleanUp cleanUp() { + return new CleanUp(); + } } -- cgit v1.2.3