Skip to content

Commit

Permalink
fix: 경로 수정 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpeel5839 authored Aug 3, 2024
1 parent 1eebd00 commit 5c4d0b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions app/src/main/kotlin/com/wespot/config/FirebaseConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ 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 {

@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()
Expand All @@ -22,7 +21,7 @@ class FirebaseConfig {
FirebaseApp.initializeApp(options)
}
} catch (e: Exception) {
throw IllegalArgumentException("Firebase APP 연결에 실패했습니다.")
throw IllegalArgumentException("Firebase APP 연결에 실패했습니다.", e)
}
}

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c4d0b9

Please sign in to comment.