From c6fc30c5663ca530e58a64324720d1c67b75568e Mon Sep 17 00:00:00 2001 From: kimyu0218 Date: Tue, 5 Nov 2024 23:05:45 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20PostConstruct=EB=A1=9C=20firebase=20?= =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/nexters/goalpanzi/config/FirebaseConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/nexters/goalpanzi/config/FirebaseConfig.java b/src/main/java/com/nexters/goalpanzi/config/FirebaseConfig.java index 87b1f559..0e5959ed 100644 --- a/src/main/java/com/nexters/goalpanzi/config/FirebaseConfig.java +++ b/src/main/java/com/nexters/goalpanzi/config/FirebaseConfig.java @@ -3,6 +3,7 @@ import com.google.auth.oauth2.GoogleCredentials; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; +import jakarta.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Configuration; @@ -18,6 +19,7 @@ public class FirebaseConfig { @Value("${firebase.admin-sdk}") private String encodedFirebaseAdminSdk; + @PostConstruct public FirebaseApp firebaseApp() throws IOException { byte[] decodedBytes = Base64.getDecoder().decode(encodedFirebaseAdminSdk); ByteArrayInputStream adminSdk = new ByteArrayInputStream(decodedBytes);