From 9dbbdc48eab0a8e2df8c3bb8db054d58243cfde8 Mon Sep 17 00:00:00 2001 From: shin-mallang Date: Fri, 1 Mar 2024 19:19:16 +0900 Subject: [PATCH] =?UTF-8?q?MOA-488:=20=EB=94=94=EC=BD=94=20=EC=9B=B9?= =?UTF-8?q?=ED=9B=85=20=EC=88=98=EC=A0=95=20=EC=8B=9C=EB=8F=84=EB=A5=BC=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20=EB=A1=9C=EA=B9=85=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/moa/client/discord/DiscordWebHookClientConfig.java | 5 +++++ .../java/moa/cs/application/PersonalInquiryEventHandler.java | 1 + 2 files changed, 6 insertions(+) diff --git a/core/src/main/java/moa/client/discord/DiscordWebHookClientConfig.java b/core/src/main/java/moa/client/discord/DiscordWebHookClientConfig.java index 6d3df54f..9303a31a 100644 --- a/core/src/main/java/moa/client/discord/DiscordWebHookClientConfig.java +++ b/core/src/main/java/moa/client/discord/DiscordWebHookClientConfig.java @@ -21,6 +21,11 @@ public class DiscordWebHookClientConfig { @Bean public DiscordWebHookApiClient discordWebHookApiClient() { RestClient build = RestClient.builder() + .requestInterceptor((request, body, execution) -> { + String requestBody = new String(body); + log.info("Discord WebHook API Call\n -> uri: {}\n -> body: {}", request.getURI(), requestBody); + return execution.execute(request, body); + }) .defaultStatusHandler(HttpStatusCode::isError, (request, response) -> { String responseData = new String(response.getBody().readAllBytes()); log.error("Discord WebHook API ERROR {}", responseData); diff --git a/core/src/main/java/moa/cs/application/PersonalInquiryEventHandler.java b/core/src/main/java/moa/cs/application/PersonalInquiryEventHandler.java index a44dc164..3cbb3c40 100644 --- a/core/src/main/java/moa/cs/application/PersonalInquiryEventHandler.java +++ b/core/src/main/java/moa/cs/application/PersonalInquiryEventHandler.java @@ -25,6 +25,7 @@ public class PersonalInquiryEventHandler { 문의자 ID: %s 문의자 연락처: %s """; + private final DiscordWebHookClient discordWebHookClient; @TransactionalEventListener(value = PersonalInquiryCreateEvent.class, phase = AFTER_COMMIT)