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: