From 5c4d0b9625ce9cfedadc659f1caefd610203fe22 Mon Sep 17 00:00:00 2001 From: kpeel5839 <89840550+kpeel5839@users.noreply.github.com> Date: Sun, 4 Aug 2024 02:05:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20(#66)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/kotlin/com/wespot/config/FirebaseConfig.kt | 5 ++--- build.gradle.kts | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/wespot/config/FirebaseConfig.kt b/app/src/main/kotlin/com/wespot/config/FirebaseConfig.kt index eec1ced9..3159528e 100644 --- a/app/src/main/kotlin/com/wespot/config/FirebaseConfig.kt +++ b/app/src/main/kotlin/com/wespot/config/FirebaseConfig.kt @@ -5,7 +5,6 @@ import com.google.firebase.FirebaseApp import com.google.firebase.FirebaseOptions import jakarta.annotation.PostConstruct import org.springframework.context.annotation.Configuration -import java.io.FileInputStream @Configuration class FirebaseConfig { @@ -13,7 +12,7 @@ class FirebaseConfig { @PostConstruct fun init() { try { - val serviceAccount = FileInputStream("src/main/resources/config/serviceAccountKey.json") + val serviceAccount = javaClass.classLoader.getResourceAsStream("config/serviceAccountKey.json") val options = FirebaseOptions.builder() .setCredentials(GoogleCredentials.fromStream(serviceAccount)) .build() @@ -22,7 +21,7 @@ class FirebaseConfig { FirebaseApp.initializeApp(options) } } catch (e: Exception) { - throw IllegalArgumentException("Firebase APP 연결에 실패했습니다.") + throw IllegalArgumentException("Firebase APP 연결에 실패했습니다.", e) } } diff --git a/build.gradle.kts b/build.gradle.kts index 671f7408..50e7089c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -56,7 +56,8 @@ subprojects { implementation("org.jetbrains.kotlin:kotlin-reflect") implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") implementation("com.fasterxml.jackson.module:jackson-module-kotlin") - implementation("com.google.firebase:firebase-admin:8.0.1") + implementation("com.google.firebase:firebase-admin:9.2.0") + implementation("org.springframework.boot:spring-boot-starter-security") // https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk15on