Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
[#55] 외부에서 주입한 설정 값을 사용할 수 있도록 수정
Browse files Browse the repository at this point in the history
- FirebaseConfig의 ClassPathResource()를 PathResource()로 수정
  • Loading branch information
cyj199637 committed Jan 11, 2021
1 parent ff7a515 commit 6a91586
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/me/liiot/snsserver/config/FirebaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.PathResource;

import javax.annotation.PostConstruct;
import java.io.IOException;
Expand All @@ -29,7 +30,7 @@ public class FirebaseConfig {
@PostConstruct
public void initialize() {
try {
InputStream serviceAccount = new ClassPathResource(apiKeyPath).getInputStream();
InputStream serviceAccount = new PathResource(apiKeyPath).getInputStream();

FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
Expand Down

0 comments on commit 6a91586

Please sign in to comment.