From f27817ba1c3e0edfbec5dd1038c4334b9c336ebb Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sun, 2 Feb 2025 16:46:59 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[PC-414]=20feat:=20fcm=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=20=EB=B9=8C=EB=93=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/notification-fcm/build.gradle | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 infra/notification-fcm/build.gradle diff --git a/infra/notification-fcm/build.gradle b/infra/notification-fcm/build.gradle new file mode 100644 index 00000000..49dca84b --- /dev/null +++ b/infra/notification-fcm/build.gradle @@ -0,0 +1,22 @@ +plugins { + id 'java' +} + +group = 'org.yapp' +version = '0.0.1-SNAPSHOT' + +repositories { + mavenCentral() +} + +dependencies { + testImplementation platform('org.junit:junit-bom:5.10.0') + testImplementation 'org.junit.jupiter:junit-jupiter' + + implementation project(':core:exception') + implementation 'com.google.firebase:firebase-admin:9.4.3' // Google Firebase Admin +} + +test { + useJUnitPlatform() +} \ No newline at end of file From fc06ad70044e2bc8f20f0ae43e9a83b7d58be618 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sun, 2 Feb 2025 16:47:11 +0900 Subject: [PATCH 2/8] =?UTF-8?q?[PC-414]=20feat:=20fcm=20Config=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/config/FcmConfig.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 infra/notification-fcm/src/main/java/config/FcmConfig.java diff --git a/infra/notification-fcm/src/main/java/config/FcmConfig.java b/infra/notification-fcm/src/main/java/config/FcmConfig.java new file mode 100644 index 00000000..4c5992da --- /dev/null +++ b/infra/notification-fcm/src/main/java/config/FcmConfig.java @@ -0,0 +1,34 @@ +package config; + +import com.google.auth.oauth2.GoogleCredentials; +import com.google.firebase.FirebaseApp; +import com.google.firebase.FirebaseOptions; +import jakarta.annotation.PostConstruct; +import java.io.InputStream; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.yapp.core.exception.ApplicationException; +import org.yapp.core.exception.error.code.FcmErrorCode; + +@Slf4j +@Configuration +public class FcmConfig { + + @PostConstruct + public void init() { + try { + InputStream serviceAccount = new ClassPathResource( + "firebasekey.json").getInputStream(); + FirebaseOptions options = FirebaseOptions.builder() + .setCredentials(GoogleCredentials.fromStream(serviceAccount)) + .build(); + + if (FirebaseApp.getApps().isEmpty()) { + FirebaseApp.initializeApp(options); + } + } catch (Exception e) { + throw new ApplicationException(FcmErrorCode.FCM_INIT_ERROR); + } + } +} From 78610a913e045b1257c163aff9ea8a0c4d113345 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sun, 2 Feb 2025 16:47:18 +0900 Subject: [PATCH 3/8] =?UTF-8?q?[PC-414]=20feat:=20fcm=20=EC=97=90=EB=9F=AC?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/exception/error/code/FcmErrorCode.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java diff --git a/core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java b/core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java new file mode 100644 index 00000000..8bb65aef --- /dev/null +++ b/core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java @@ -0,0 +1,16 @@ +package org.yapp.core.exception.error.code; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import org.springframework.http.HttpStatus; + +@Getter +@RequiredArgsConstructor +public enum FcmErrorCode implements ErrorCode { + FCM_SEND_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "FCM 전송에 실패했습니다."), + FCM_INIT_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "FCM 초기화에 실패했습니다"), + ; + + private final HttpStatus httpStatus; + private final String message; +} From 398b3e98c4164832c3f0d8c82d7935258e610839 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sun, 2 Feb 2025 16:47:47 +0900 Subject: [PATCH 4/8] =?UTF-8?q?[PC-414]=20feat:=20fcm=20=EB=B0=9C=EC=86=A1?= =?UTF-8?q?=20=EC=84=9C=EB=B9=84=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/application/FcmSendService.java | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 infra/notification-fcm/src/main/java/application/FcmSendService.java diff --git a/infra/notification-fcm/src/main/java/application/FcmSendService.java b/infra/notification-fcm/src/main/java/application/FcmSendService.java new file mode 100644 index 00000000..4428cee4 --- /dev/null +++ b/infra/notification-fcm/src/main/java/application/FcmSendService.java @@ -0,0 +1,99 @@ +package application; + +import com.google.firebase.messaging.FirebaseMessaging; +import com.google.firebase.messaging.FirebaseMessagingException; +import com.google.firebase.messaging.Message; +import com.google.firebase.messaging.Notification; +import java.util.Map; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import org.yapp.core.exception.ApplicationException; +import org.yapp.core.exception.error.code.FcmErrorCode; + +@Service +@RequiredArgsConstructor +public class FcmSendService { + + public void sendNotificationWithToken(String token, String title, String body) { + try { + FirebaseMessaging.getInstance().send(Message.builder() + .setNotification(Notification.builder() + .setTitle(title) + .setBody(body) + .build()) + .setToken(token) + .build()); + } catch (FirebaseMessagingException e) { + throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + } + } + + public void sendNotificationWithTopic(String topic, String title, String body) { + try { + FirebaseMessaging.getInstance().send(Message.builder() + .setNotification(Notification.builder() + .setTitle(title) + .setBody(body) + .build()) + .setTopic(topic) + .build()); + } catch (FirebaseMessagingException e) { + throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + } + } + + public void sendDataWithToken(String token, Map data) { + try { + FirebaseMessaging.getInstance().send(Message.builder() + .setToken(token) + .putAllData(data) + .build()); + } catch (FirebaseMessagingException e) { + throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + } + } + + public void sendDataWithTopic(String topic, Map data) { + try { + FirebaseMessaging.getInstance().send(Message.builder() + .setTopic(topic) + .putAllData(data) + .build()); + } catch (FirebaseMessagingException e) { + throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + } + } + + public void sendNotificationAndDataWithToken(String token, Map data, String title, + String body) { + try { + FirebaseMessaging.getInstance().send(Message.builder() + .setNotification(Notification.builder() + .setTitle(title) + .setBody(body) + .build()) + .setToken(token) + .putAllData(data) + .build()); + } catch (FirebaseMessagingException e) { + throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + } + } + + public void sendNotificationAndDataWithTopic(String topic, Map data, String title, + String body) { + try { + FirebaseMessaging.getInstance().send(Message.builder() + .setNotification(Notification.builder() + .setTitle(title) + .setBody(body) + .build()) + .setTopic(topic) + .putAllData(data) + .build()); + } catch (FirebaseMessagingException e) { + throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + } + } +} + From fd01ef255cde0983b530e36041445ff27faadff9 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sun, 2 Feb 2025 16:47:56 +0900 Subject: [PATCH 5/8] =?UTF-8?q?[PC-414]=20feat:=20fcm=20=ED=86=A0=ED=81=B0?= =?UTF-8?q?=20=EB=8F=84=EB=A9=94=EC=9D=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/yapp/core/domain/fcm/FcmToken.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 core/domain/src/main/java/org/yapp/core/domain/fcm/FcmToken.java diff --git a/core/domain/src/main/java/org/yapp/core/domain/fcm/FcmToken.java b/core/domain/src/main/java/org/yapp/core/domain/fcm/FcmToken.java new file mode 100644 index 00000000..d64e467c --- /dev/null +++ b/core/domain/src/main/java/org/yapp/core/domain/fcm/FcmToken.java @@ -0,0 +1,24 @@ +package org.yapp.core.domain.fcm; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import lombok.Getter; + +@Entity +@Getter +@Table(name = "fcm_token") +public class FcmToken { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private Long id; + @Column(name = "user_id") + private Long userId; + @Column(name = "token") + private String token; +} From d4a66f0c80a3f8b8aacc81a9dc6efdbc05af6da0 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sun, 2 Feb 2025 16:48:14 +0900 Subject: [PATCH 6/8] =?UTF-8?q?[PC-414]=20feat:=20fcm=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=20settings.gradle=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings.gradle b/settings.gradle index d2d4e33f..bfaa2c00 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,4 +17,6 @@ include 'infra:redis' findProject(':infra:redis')?.name = 'redis' include 'infra:sms' findProject(':infra:sms')?.name = 'sms' +include 'infra:notification-fcm' +findProject(':infra:notification-fcm')?.name = 'notification-fcm' From ac40473e28daf7ea2c251e894e29266023343536 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sat, 8 Feb 2025 15:45:27 +0900 Subject: [PATCH 7/8] =?UTF-8?q?[PC-414]=20=EB=AA=A8=EB=93=88=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20Notification=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=B6=94=EC=83=81=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...orCode.java => NotificationErrorCode.java} | 5 ++-- core/notification/build.gradle | 22 ++++++++++++++++++ .../java/application/NotificationService.java | 19 +++++++++++++++ .../src/main/java/client/ApnClient.java | 19 +++++++++++++++ .../src/main/java/client/FcmClient.java | 23 +++++++++++++++++++ .../main/java/client/NotificationClient.java | 8 +++++++ .../java/enums/NotificationClientName.java | 14 +++++++++++ .../java/provider/NotificationProvider.java | 21 +++++++++++++++++ infra/{notification-fcm => fcm}/build.gradle | 0 .../main/java/application/FcmSendService.java | 14 +++++------ .../src/main/java/config/FcmConfig.java | 4 ++-- settings.gradle | 6 +++-- 12 files changed, 142 insertions(+), 13 deletions(-) rename core/exception/src/main/java/org/yapp/core/exception/error/code/{FcmErrorCode.java => NotificationErrorCode.java} (72%) create mode 100644 core/notification/build.gradle create mode 100644 core/notification/src/main/java/application/NotificationService.java create mode 100644 core/notification/src/main/java/client/ApnClient.java create mode 100644 core/notification/src/main/java/client/FcmClient.java create mode 100644 core/notification/src/main/java/client/NotificationClient.java create mode 100644 core/notification/src/main/java/enums/NotificationClientName.java create mode 100644 core/notification/src/main/java/provider/NotificationProvider.java rename infra/{notification-fcm => fcm}/build.gradle (100%) rename infra/{notification-fcm => fcm}/src/main/java/application/FcmSendService.java (83%) rename infra/{notification-fcm => fcm}/src/main/java/config/FcmConfig.java (86%) diff --git a/core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java b/core/exception/src/main/java/org/yapp/core/exception/error/code/NotificationErrorCode.java similarity index 72% rename from core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java rename to core/exception/src/main/java/org/yapp/core/exception/error/code/NotificationErrorCode.java index 8bb65aef..c9504215 100644 --- a/core/exception/src/main/java/org/yapp/core/exception/error/code/FcmErrorCode.java +++ b/core/exception/src/main/java/org/yapp/core/exception/error/code/NotificationErrorCode.java @@ -6,10 +6,11 @@ @Getter @RequiredArgsConstructor -public enum FcmErrorCode implements ErrorCode { +public enum NotificationErrorCode implements ErrorCode { FCM_SEND_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "FCM 전송에 실패했습니다."), FCM_INIT_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "FCM 초기화에 실패했습니다"), - ; + + NOTIFICATION_CLIENT_NOT_FOUND(HttpStatus.BAD_REQUEST, "알림 클라이언트를 찾을 수 없습니다."); private final HttpStatus httpStatus; private final String message; diff --git a/core/notification/build.gradle b/core/notification/build.gradle new file mode 100644 index 00000000..4efeb522 --- /dev/null +++ b/core/notification/build.gradle @@ -0,0 +1,22 @@ +plugins { + id 'java' +} + +group = 'org.yapp' +version = '0.0.1-SNAPSHOT' + +repositories { + mavenCentral() +} + +dependencies { + implementation project(':core:exception') + implementation project(':infra:fcm') + + testImplementation platform('org.junit:junit-bom:5.10.0') + testImplementation 'org.junit.jupiter:junit-jupiter' +} + +test { + useJUnitPlatform() +} \ No newline at end of file diff --git a/core/notification/src/main/java/application/NotificationService.java b/core/notification/src/main/java/application/NotificationService.java new file mode 100644 index 00000000..be5c6ae9 --- /dev/null +++ b/core/notification/src/main/java/application/NotificationService.java @@ -0,0 +1,19 @@ +package application; + +import client.NotificationClient; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import provider.NotificationProvider; + +@Service +@RequiredArgsConstructor +public class NotificationService { + + private final NotificationProvider notificationProvider; + + public void sendNotification(String clientName, String token, String title, String message) { + NotificationClient notificationClient = notificationProvider.getNotificationClient( + clientName); + notificationClient.sendNotification(token, title, message); + } +} diff --git a/core/notification/src/main/java/client/ApnClient.java b/core/notification/src/main/java/client/ApnClient.java new file mode 100644 index 00000000..fad00ddf --- /dev/null +++ b/core/notification/src/main/java/client/ApnClient.java @@ -0,0 +1,19 @@ +package client; + +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class ApnClient implements NotificationClient { + + @Override + public boolean match(String clientName) { + return false; + } + + @Override + public void sendNotification(String token, String title, String message) { + + } +} diff --git a/core/notification/src/main/java/client/FcmClient.java b/core/notification/src/main/java/client/FcmClient.java new file mode 100644 index 00000000..e3a9083b --- /dev/null +++ b/core/notification/src/main/java/client/FcmClient.java @@ -0,0 +1,23 @@ +package client; + +import application.FcmSendService; +import enums.NotificationClientName; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class FcmClient implements NotificationClient { + + private final FcmSendService fcmSendService; + + @Override + public boolean match(String clientName) { + return NotificationClientName.APM_CLIENT.getClientName().equals(clientName); + } + + @Override + public void sendNotification(String token, String title, String message) { + fcmSendService.sendNotificationWithToken(token, title, message); + } +} diff --git a/core/notification/src/main/java/client/NotificationClient.java b/core/notification/src/main/java/client/NotificationClient.java new file mode 100644 index 00000000..bd2bd7b7 --- /dev/null +++ b/core/notification/src/main/java/client/NotificationClient.java @@ -0,0 +1,8 @@ +package client; + +public interface NotificationClient { + + boolean match(String clientName); + + void sendNotification(String token, String title, String message); +} diff --git a/core/notification/src/main/java/enums/NotificationClientName.java b/core/notification/src/main/java/enums/NotificationClientName.java new file mode 100644 index 00000000..a9f8e1b0 --- /dev/null +++ b/core/notification/src/main/java/enums/NotificationClientName.java @@ -0,0 +1,14 @@ +package enums; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public enum NotificationClientName { + FCM_CLIENT("fcm"), + APM_CLIENT("apn"), + ; + + private final String clientName; +} diff --git a/core/notification/src/main/java/provider/NotificationProvider.java b/core/notification/src/main/java/provider/NotificationProvider.java new file mode 100644 index 00000000..34260bdf --- /dev/null +++ b/core/notification/src/main/java/provider/NotificationProvider.java @@ -0,0 +1,21 @@ +package provider; + +import client.NotificationClient; +import java.util.List; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; +import org.yapp.core.exception.ApplicationException; +import org.yapp.core.exception.error.code.NotificationErrorCode; + +@Component +@RequiredArgsConstructor +public class NotificationProvider { + + private final List notificationClients; + + public NotificationClient getNotificationClient(String clientName) { + return notificationClients.stream().filter(client -> client.match(clientName)).findFirst() + .orElseThrow( + () -> new ApplicationException(NotificationErrorCode.NOTIFICATION_CLIENT_NOT_FOUND)); + } +} diff --git a/infra/notification-fcm/build.gradle b/infra/fcm/build.gradle similarity index 100% rename from infra/notification-fcm/build.gradle rename to infra/fcm/build.gradle diff --git a/infra/notification-fcm/src/main/java/application/FcmSendService.java b/infra/fcm/src/main/java/application/FcmSendService.java similarity index 83% rename from infra/notification-fcm/src/main/java/application/FcmSendService.java rename to infra/fcm/src/main/java/application/FcmSendService.java index 4428cee4..d8ba4f74 100644 --- a/infra/notification-fcm/src/main/java/application/FcmSendService.java +++ b/infra/fcm/src/main/java/application/FcmSendService.java @@ -8,7 +8,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.yapp.core.exception.ApplicationException; -import org.yapp.core.exception.error.code.FcmErrorCode; +import org.yapp.core.exception.error.code.NotificationErrorCode; @Service @RequiredArgsConstructor @@ -24,7 +24,7 @@ public void sendNotificationWithToken(String token, String title, String body) { .setToken(token) .build()); } catch (FirebaseMessagingException e) { - throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_SEND_ERROR); } } @@ -38,7 +38,7 @@ public void sendNotificationWithTopic(String topic, String title, String body) { .setTopic(topic) .build()); } catch (FirebaseMessagingException e) { - throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_SEND_ERROR); } } @@ -49,7 +49,7 @@ public void sendDataWithToken(String token, Map data) { .putAllData(data) .build()); } catch (FirebaseMessagingException e) { - throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_SEND_ERROR); } } @@ -60,7 +60,7 @@ public void sendDataWithTopic(String topic, Map data) { .putAllData(data) .build()); } catch (FirebaseMessagingException e) { - throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_SEND_ERROR); } } @@ -76,7 +76,7 @@ public void sendNotificationAndDataWithToken(String token, Map d .putAllData(data) .build()); } catch (FirebaseMessagingException e) { - throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_SEND_ERROR); } } @@ -92,7 +92,7 @@ public void sendNotificationAndDataWithTopic(String topic, Map d .putAllData(data) .build()); } catch (FirebaseMessagingException e) { - throw new ApplicationException(FcmErrorCode.FCM_SEND_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_SEND_ERROR); } } } diff --git a/infra/notification-fcm/src/main/java/config/FcmConfig.java b/infra/fcm/src/main/java/config/FcmConfig.java similarity index 86% rename from infra/notification-fcm/src/main/java/config/FcmConfig.java rename to infra/fcm/src/main/java/config/FcmConfig.java index 4c5992da..66534098 100644 --- a/infra/notification-fcm/src/main/java/config/FcmConfig.java +++ b/infra/fcm/src/main/java/config/FcmConfig.java @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.yapp.core.exception.ApplicationException; -import org.yapp.core.exception.error.code.FcmErrorCode; +import org.yapp.core.exception.error.code.NotificationErrorCode; @Slf4j @Configuration @@ -28,7 +28,7 @@ public void init() { FirebaseApp.initializeApp(options); } } catch (Exception e) { - throw new ApplicationException(FcmErrorCode.FCM_INIT_ERROR); + throw new ApplicationException(NotificationErrorCode.FCM_INIT_ERROR); } } } diff --git a/settings.gradle b/settings.gradle index bfaa2c00..1b2fbefd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,6 +17,8 @@ include 'infra:redis' findProject(':infra:redis')?.name = 'redis' include 'infra:sms' findProject(':infra:sms')?.name = 'sms' -include 'infra:notification-fcm' -findProject(':infra:notification-fcm')?.name = 'notification-fcm' +include 'infra:fcm' +findProject(':infra:fcm')?.name = 'fcm' +include 'core:notification' +findProject(':core:notification')?.name = 'notification' From 02883f808c7180758aabdd33a99a251a7f038314 Mon Sep 17 00:00:00 2001 From: Chanho Lee Date: Sat, 8 Feb 2025 15:48:25 +0900 Subject: [PATCH 8/8] =?UTF-8?q?[PC-414]=20fix:=20FcmClient=20=EC=98=A4?= =?UTF-8?q?=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/notification/src/main/java/client/FcmClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/notification/src/main/java/client/FcmClient.java b/core/notification/src/main/java/client/FcmClient.java index e3a9083b..2523294e 100644 --- a/core/notification/src/main/java/client/FcmClient.java +++ b/core/notification/src/main/java/client/FcmClient.java @@ -13,7 +13,7 @@ public class FcmClient implements NotificationClient { @Override public boolean match(String clientName) { - return NotificationClientName.APM_CLIENT.getClientName().equals(clientName); + return NotificationClientName.FCM_CLIENT.getClientName().equals(clientName); } @Override