From aa4f417bbd4d12a1cf9913f41cd3f929ccaba1a8 Mon Sep 17 00:00:00 2001 From: sgo722 Date: Sun, 1 Feb 2026 23:00:05 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EC=B1=84=ED=8C=85=EB=B0=A9=20=EC=A7=88?= =?UTF-8?q?=EB=AC=B8=20=EC=B6=94=EC=B2=9C=20API=20LazyInitializationExcept?= =?UTF-8?q?ion=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - QuestionRecommendResponseV2 응답 시 Map으로 직접 구성 - SavedChatDto.partner: Member 직렬화 방지 - chat 필드에 ChatResponse만 포함하여 Lazy 로딩 문제 해결 Closes #395 Co-Authored-By: Claude Opus 4.5 --- src/main/kotlin/codel/chat/presentation/ChatController.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/codel/chat/presentation/ChatController.kt b/src/main/kotlin/codel/chat/presentation/ChatController.kt index 6e344b0..3595b2e 100644 --- a/src/main/kotlin/codel/chat/presentation/ChatController.kt +++ b/src/main/kotlin/codel/chat/presentation/ChatController.kt @@ -97,7 +97,13 @@ class ChatController( if (body.success && body.chat != null) { sendQuestionWebSocketMessages(chatRoomId, requester, body.chat) } - response + // Map으로 직접 응답 구성 (SavedChatDto.partner 직렬화 시 LazyInitializationException 방지) + ResponseEntity.ok(mapOf( + "success" to body.success, + "question" to body.question, + "chat" to body.chat?.chatResponse, + "exhaustedMessage" to body.exhaustedMessage + )) } is QuestionSendResult -> { sendQuestionWebSocketMessages(chatRoomId, requester, body)