From 2df1dd3a5087c4c73a7f61101bbb96622b9f63ce Mon Sep 17 00:00:00 2001 From: DongUk <68818952+Kim0914@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:34:33 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20FCM=20=EC=A0=95=EC=A0=81=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EB=B9=88=20=EC=A3=BC=EC=9E=85=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../notification/fcm/application/FcmMessageSender.java | 4 +++- backend/pium/src/main/resources/application.yml | 8 +++----- backend/pium/src/test/resources/application.yml | 5 +---- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/backend/pium/src/main/java/com/official/pium/notification/fcm/application/FcmMessageSender.java b/backend/pium/src/main/java/com/official/pium/notification/fcm/application/FcmMessageSender.java index ba1109e5..eba7f6dc 100644 --- a/backend/pium/src/main/java/com/official/pium/notification/fcm/application/FcmMessageSender.java +++ b/backend/pium/src/main/java/com/official/pium/notification/fcm/application/FcmMessageSender.java @@ -13,6 +13,7 @@ import java.util.concurrent.ExecutionException; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Component; @@ -21,7 +22,8 @@ @RequiredArgsConstructor public class FcmMessageSender implements MessageSendManager { - private static final String FCM_JSON_PATH = "config/pium-fcm.json"; + @Value("${fcm.json.path}") + private String FCM_JSON_PATH; @PostConstruct public void initialize() { diff --git a/backend/pium/src/main/resources/application.yml b/backend/pium/src/main/resources/application.yml index 5b1ccb8f..7d605ec1 100644 --- a/backend/pium/src/main/resources/application.yml +++ b/backend/pium/src/main/resources/application.yml @@ -27,11 +27,9 @@ management: endpoints: enabled-by-default: false fcm: - key: - path: test/ - scope: https://www.googleapis.com/auth/firebase.messaging - api: - url: https://fcm.googleapis.com/v1/projects/project-id/messages:send + json: + path: config/pium-fcm.json + petPlant: image: directory: test diff --git a/backend/pium/src/test/resources/application.yml b/backend/pium/src/test/resources/application.yml index f25c9199..8fc7a303 100644 --- a/backend/pium/src/test/resources/application.yml +++ b/backend/pium/src/test/resources/application.yml @@ -64,11 +64,8 @@ server: max-http-form-post-size: 10MB fcm: - key: + json: path: config/pium-fcm.json - scope: https://www.googleapis.com/auth/firebase.messaging - api: - url: https://fcm.googleapis.com/v1/projects/pium-test/messages:send management: endpoint: