Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fcm private key를 찾을 수 없는 문제 해결 #381

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
Expand All @@ -35,8 +35,7 @@ FirebaseMessaging firebaseMessaging() throws IOException {
return FirebaseMessaging.getInstance(FIREBASE_APP);
}

final ClassPathResource resource = new ClassPathResource(FCM_PRIVATE_KEY_PATH);
final InputStream refreshToken = resource.getInputStream();
final FileInputStream refreshToken = new FileInputStream(FCM_PRIVATE_KEY_PATH);

final List<FirebaseApp> firebaseApps = FirebaseApp.getApps();
if (firebaseApps.isEmpty()) {
Expand Down