aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/components/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/configuration')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java9
1 files changed, 9 insertions, 0 deletions
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();
+ }
}