Skip to content

Commit

Permalink
fix: classpath로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mingeun0507 committed Feb 28, 2024
1 parent 194e5eb commit 8f9cb5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
run: echo ${{ secrets.APPLICATION_PROD_BASE64 }} | base64 --decode > ./src/main/resources/application-prod.yml
shell: bash

- name: make madii-app-firebase-adminsdk-uriyk-c04677456f.json
run: echo ${{ secrets.FIREBASE_KEY_BASE64 }} | base64 --decode > ./src/main/resources/madii-app-firebase-adminsdk-uriyk-c04677456f.json
shell: bash

- name: create madii-app-firebase-adminsdk-uriyk-c04677456f.json
id: create-json
uses: jsdaniell/create-json@1.1.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import org.springframework.beans.factory.InitializingBean;
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.InputStream;

@Configuration
Expand All @@ -26,7 +26,7 @@ public void afterPropertiesSet() {

private void initialize() {
try (
final InputStream serviceAccount = new FileInputStream(firebaseKeyFilePath)
final InputStream serviceAccount = new ClassPathResource(firebaseKeyFilePath).getInputStream();
) {
final FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
Expand Down

0 comments on commit 8f9cb5d

Please sign in to comment.