aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/components
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/configuration/NotificationsAppConfiguration.java12
1 files changed, 6 insertions, 6 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 ff3a5a5a..67a551c4 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,12 +1,10 @@
package com.juick.components.configuration;
import com.juick.components.Notifications;
-import com.juick.configuration.DataConfiguration;
import com.notnoop.apns.APNS;
import com.notnoop.apns.ApnsService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.http.client.ClientHttpRequestInterceptor;
@@ -30,10 +28,11 @@ public class NotificationsAppConfiguration {
@Bean
public RestTemplate rest() {
RestTemplate rest = new RestTemplate();
- List<ClientHttpRequestInterceptor> interceptors = Collections
- .singletonList(
- new BasicAuthorizationInterceptor(env.getProperty("api_user", "juick"),
- env.getProperty("api_password", "secret")));
+ List<ClientHttpRequestInterceptor> interceptors = Collections.singletonList(
+ new BasicAuthorizationInterceptor(
+ env.getProperty("api_user", "juick"),
+ env.getProperty("api_password", "secret")));
+
rest.setRequestFactory(new InterceptingClientHttpRequestFactory(rest.getRequestFactory(), interceptors));
return rest;
}
@@ -42,6 +41,7 @@ public class NotificationsAppConfiguration {
public Notifications push() {
return new Notifications(env, rest());
}
+
@Bean
public ApnsService apns() {
return APNS.newService().withCert(env.getProperty("ios_pkcs12_file"), env.getProperty("ios_pkcs12_password"))