From ccafe5c0ab47339468908bb80c70f56b59e64d74 Mon Sep 17 00:00:00 2001 From: realisshomyang Date: Sat, 17 Feb 2024 19:14:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=20:=20firebase=20sdk=20path=20?= =?UTF-8?q?=EC=83=81=EB=8C=80=20=EA=B2=BD=EB=A1=9C=20=EC=A0=88=EB=8C=80=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/onnoff/onnoff/config/FirebaseConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/onnoff/onnoff/config/FirebaseConfig.java b/src/main/java/com/onnoff/onnoff/config/FirebaseConfig.java index 70a9fc0..39a4b7c 100644 --- a/src/main/java/com/onnoff/onnoff/config/FirebaseConfig.java +++ b/src/main/java/com/onnoff/onnoff/config/FirebaseConfig.java @@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; + +import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -25,8 +27,7 @@ public class FirebaseConfig { @PostConstruct public void initialize() { try { - ClassPathResource resource = new ClassPathResource(firebaseSdkPath); - InputStream serviceAccount = resource.getInputStream(); + InputStream serviceAccount = new FileInputStream(firebaseSdkPath); FirebaseOptions options = FirebaseOptions.builder() .setCredentials(GoogleCredentials.fromStream(serviceAccount)) .build(); From 82f9507fd582fff3ed878ee839c886349e3bf606 Mon Sep 17 00:00:00 2001 From: realisshomyang Date: Sat, 17 Feb 2024 19:16:41 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=20:=20application.yml=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 96e3d44..0eb1f6c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -26,6 +26,6 @@ kakao: client-id: ${KAKAO_CLIENT_ID} admin-key: ${KAKAO_ADMIN_KEY} fcm: - firebase-sdk-path : ${FIREBASE_SDK_PATH} + firebase-sdk-path : /var/app/current/src/main/resources/${FIREBASE_SDK_PATH} project-id : ${FIREBASE_PROJECT_ID}