From ea519116e9b5ff184498241298d8c9002a173c73 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 30 Jun 2017 11:40:06 +0300 Subject: notifications: fix configuration --- .../java/com/juick/components/configuration/APNSConfiguration.java | 4 ++-- .../components/configuration/NotificationsAppConfiguration.java | 5 +++-- .../com/juick/components/configuration/NotificationsInitializer.java | 5 +---- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'juick-notifications/src/main/java/com/juick') diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/APNSConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/APNSConfiguration.java index a4959497..6ac155a1 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/APNSConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/APNSConfiguration.java @@ -11,9 +11,9 @@ import org.springframework.context.annotation.Configuration; */ @Configuration public class APNSConfiguration { - @Value("${ios_pkcs12_file}") + @Value("${ios_pkcs12_file:}") private String pkcs12File; - @Value("${ios_pkcs12_password}") + @Value("${ios_pkcs12_password:}") private String pkcs12secret; @Bean public ApnsService apns() { 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 b50edfd5..5f20e43e 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 @@ -21,8 +21,9 @@ import java.util.List; @Configuration @EnableScheduling @PropertySource("classpath:juick.conf") -@ComponentScan(basePackages = {"com.juick.components.service"}) -@Import(BaseWebConfiguration.class) +@ComponentScan(basePackages = "com.juick.components.service") +@Import({ BaseWebConfiguration.class, APNSConfiguration.class, MPNSConfiguration.class, + GCMConfiguration.class, XMPPConfiguration.class }) public class NotificationsAppConfiguration extends WebMvcConfigurationSupport { @Value("${api_user:juick}") private String apiUser; diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java index cc604b02..d4068d26 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/NotificationsInitializer.java @@ -13,10 +13,7 @@ public class NotificationsInitializer extends AbstractAnnotationConfigDispatcher @Override protected Class[] getRootConfigClasses() { - return new Class[]{ - APNSConfiguration.class, MPNSConfiguration.class, - GCMConfiguration.class, XMPPConfiguration.class - }; + return new Class[] {}; } @Override -- cgit v1.2.3