diff options
author | 2018-09-25 12:49:57 +0300 | |
---|---|---|
committer | 2018-09-25 12:49:57 +0300 | |
commit | 15753b2ebdac2ab49cf5682c417851a0653e136e (patch) | |
tree | 81efc43348a820a1c647779f78264bce10103b59 /juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java | |
parent | ae76024011a8442ae7eab953e0b97e9fe2c7c201 (diff) |
notifications server refactoring
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java')
-rw-r--r-- | juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java b/juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java index 27e1af0f..68d9f017 100644 --- a/juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java +++ b/juick-notifications/src/main/java/com/juick/components/configuration/GCMConfiguration.java @@ -1,8 +1,7 @@ package com.juick.components.configuration; -import com.google.android.gcm.server.Endpoint; -import com.google.android.gcm.server.Sender; -import org.springframework.beans.factory.annotation.Value; +import com.juick.components.FirebaseManager; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -10,12 +9,11 @@ import org.springframework.context.annotation.Configuration; * Created by vital on 29.03.2017. */ @Configuration +@ConditionalOnProperty(name = "gcm_key") public class GCMConfiguration { - @Value("${gcm_key:}") - private String gcmKey; @Bean - public Sender GCMSender() { - return new Sender(gcmKey, Endpoint.GCM); + public FirebaseManager firebaseManager() { + return new FirebaseManager(); } } |