Skip to content

Commit

Permalink
Merge pull request #92 from OnAndOff-UMC/feat/#90
Browse files Browse the repository at this point in the history
[fix] : firebase config 파일 배포에 맞게 수정
  • Loading branch information
realisshomyang authored Feb 17, 2024
2 parents b300bec + 82f9507 commit d90d565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/onnoff/onnoff/config/FirebaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit d90d565

Please sign in to comment.