Skip to content

Commit

Permalink
refactor: FCM 파일 경로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim0914 committed Jan 22, 2024
1 parent b92cfc6 commit 53ba512
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
@RequiredArgsConstructor
public class FcmMessageSender implements MessageSendManager {

private static final String JSON_FILE_PATH = "src/main/resources/config/pium-fcm.json";
private static final String SYSTEM_PATH = System.getProperty("user.dir");
private static final String JSON_FILE_PATH = "/src/main/resources/config/pium-fcm.json";

@Value("${fcm.api.url}")
private String apiUrl;
Expand All @@ -42,7 +43,7 @@ public class FcmMessageSender implements MessageSendManager {
public void initialize() {
FileInputStream serviceAccount;
try {
serviceAccount = new FileInputStream(JSON_FILE_PATH);
serviceAccount = new FileInputStream(SYSTEM_PATH + JSON_FILE_PATH);
FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.build();
Expand Down

0 comments on commit 53ba512

Please sign in to comment.