From 8f08a2424bbea9638a2b57767f70654541a96709 Mon Sep 17 00:00:00 2001 From: kwonyj1022 Date: Fri, 15 Sep 2023 16:47:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20fcm=20private=20key=EB=A5=BC=20=EC=9D=BD?= =?UTF-8?q?=EC=9D=84=20=EC=88=98=20=EC=97=86=EB=8A=94=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ddang/ddang/configuration/fcm/FcmConfiguration.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/ddang/src/main/java/com/ddang/ddang/configuration/fcm/FcmConfiguration.java b/backend/ddang/src/main/java/com/ddang/ddang/configuration/fcm/FcmConfiguration.java index 80c23363a..34f8ea204 100644 --- a/backend/ddang/src/main/java/com/ddang/ddang/configuration/fcm/FcmConfiguration.java +++ b/backend/ddang/src/main/java/com/ddang/ddang/configuration/fcm/FcmConfiguration.java @@ -8,8 +8,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ClassPathResource; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.List; @@ -35,8 +35,7 @@ FirebaseMessaging firebaseMessaging() throws IOException { return FirebaseMessaging.getInstance(FIREBASE_APP); } - final ClassPathResource resource = new ClassPathResource(FCM_PRIVATE_KEY_PATH); - final InputStream refreshToken = resource.getInputStream(); + final FileInputStream refreshToken = new FileInputStream(FCM_PRIVATE_KEY_PATH); final List firebaseApps = FirebaseApp.getApps(); if (firebaseApps.isEmpty()) {