Skip to content

Commit

Permalink
chore: FCM 정적 변수 빈 주입으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim0914 committed Jan 25, 2024
1 parent c899096 commit 2df1dd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.concurrent.ExecutionException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Component;

Expand All @@ -21,7 +22,8 @@
@RequiredArgsConstructor
public class FcmMessageSender implements MessageSendManager {

private static final String FCM_JSON_PATH = "config/pium-fcm.json";
@Value("${fcm.json.path}")
private String FCM_JSON_PATH;

@PostConstruct
public void initialize() {
Expand Down
8 changes: 3 additions & 5 deletions backend/pium/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ management:
endpoints:
enabled-by-default: false
fcm:
key:
path: test/
scope: https://www.googleapis.com/auth/firebase.messaging
api:
url: https://fcm.googleapis.com/v1/projects/project-id/messages:send
json:
path: config/pium-fcm.json

petPlant:
image:
directory: test
Expand Down
5 changes: 1 addition & 4 deletions backend/pium/src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,8 @@ server:
max-http-form-post-size: 10MB

fcm:
key:
json:
path: config/pium-fcm.json
scope: https://www.googleapis.com/auth/firebase.messaging
api:
url: https://fcm.googleapis.com/v1/projects/pium-test/messages:send

management:
endpoint:
Expand Down

0 comments on commit 2df1dd3

Please sign in to comment.