diff --git a/backend/src/main/java/com/twtw/backend/config/firebase/FcmConfig.java b/backend/src/main/java/com/twtw/backend/config/firebase/FcmConfig.java index 47ff233b..46a742f8 100644 --- a/backend/src/main/java/com/twtw/backend/config/firebase/FcmConfig.java +++ b/backend/src/main/java/com/twtw/backend/config/firebase/FcmConfig.java @@ -12,21 +12,21 @@ @Configuration public class FcmConfig { - private final ClassPathResource firebaseResource = new ClassPathResource( + private static final ClassPathResource FIREBASE_RESOURCE = new ClassPathResource( "backend/src/main/resources/firebase/twtw_firebase_key.json" ); @Bean - FirebaseApp firebaseApp() throws IOException { + public FirebaseApp firebaseApp() throws IOException { FirebaseOptions options = FirebaseOptions.builder() - .setCredentials(GoogleCredentials.fromStream(firebaseResource.getInputStream())) + .setCredentials(GoogleCredentials.fromStream(FIREBASE_RESOURCE.getInputStream())) .build(); return FirebaseApp.initializeApp(options); } @Bean - FirebaseMessaging firebaseMessaging() throws IOException { + public FirebaseMessaging firebaseMessaging() throws IOException { return FirebaseMessaging.getInstance(firebaseApp()); } }