From f07d68b43f5c502c59f8796f007a8176b2beb88d Mon Sep 17 00:00:00 2001 From: htlee Date: Fri, 17 Apr 2026 07:40:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(backend):=20Spring=206.1=20RestClient?= =?UTF-8?q?=20bean=20=EB=AA=A8=ED=98=B8=EC=84=B1=20=EA=B8=B0=EB=8F=99=20?= =?UTF-8?q?=EC=8B=A4=ED=8C=A8=20=ED=95=B4=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 증상: rocky-211 의 kcg-ai-backend 가 `No qualifying bean of type RestClient, but 2 were found: predictionRestClient, signalBatchRestClient` 로 기동 실패 반복. PR #A 의 RestClientConfig 도입 이후 잠복해 있던 문제로, PredictionProxyController / VesselAnalysisProxyController 의 필드 @Qualifier 가 Lombok `@RequiredArgsConstructor` 가 만든 constructor parameter 로 복사되지 않아 Spring 6.1 의 bean 이름 fallback 이 실패한 것. - backend/pom.xml — default-compile / default-testCompile 의 configuration 에 `true` 추가. spring-boot-starter-parent 기본값을 executions override 과정에서 덮어쓰지 않도록 명시. - backend/src/main/java/lombok.config — `lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier`. Lombok 이 필드의 @Qualifier 를 생성된 constructor parameter 로 복사해야 Spring 이 파라미터 레벨 annotation 으로 해당 bean 을 식별할 수 있음. 검증: javap 로 PredictionProxyController 생성자의 RuntimeVisibleParameterAnnotations 에 @Qualifier("predictionRestClient") 가 실제 복사되었는지 확인, 재빌드/재배포 후 rocky-211 기동 성공("Started KcgAiApplication in 7.333 seconds") + Tomcat 18080 정상 리스닝. --- backend/pom.xml | 2 ++ backend/src/main/java/lombok.config | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 backend/src/main/java/lombok.config diff --git a/backend/pom.xml b/backend/pom.xml index 7384f52..3c8b0ae 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -142,6 +142,7 @@ compile + true org.springframework.boot @@ -161,6 +162,7 @@ testCompile + true org.projectlombok diff --git a/backend/src/main/java/lombok.config b/backend/src/main/java/lombok.config new file mode 100644 index 0000000..8022e7c --- /dev/null +++ b/backend/src/main/java/lombok.config @@ -0,0 +1,6 @@ +config.stopBubbling = true + +# @RequiredArgsConstructor 가 생성하는 constructor parameter 에 필드의 @Qualifier 를 복사한다. +# Spring 6.1+ 의 bean 이름 기반 fallback 은 parameter-level annotation 을 요구하므로, +# 필수 처리하지 않으면 여러 bean 중 모호성이 발생해 기동이 실패한다. +lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier From b0d9630dde9f54685378e8998e33f9432f7a8408 Mon Sep 17 00:00:00 2001 From: htlee Date: Fri, 17 Apr 2026 07:42:44 +0900 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=EB=A6=B4=EB=A6=AC=EC=A6=88=20?= =?UTF-8?q?=EB=85=B8=ED=8A=B8=20=EC=A0=95=EB=A6=AC=20(2026-04-17.4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/RELEASE-NOTES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index 7488414..d3a4c8f 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -4,6 +4,11 @@ ## [Unreleased] +## [2026-04-17.4] + +### 수정 +- **백엔드 RestClient bean 모호성으로 기동 실패 해소** — rocky-211 `kcg-ai-backend` 가 restart 시 `No qualifying bean of type RestClient, but 2 were found: predictionRestClient, signalBatchRestClient` 로 크래시 루프 진입하던 문제. PR #A(2026-04-17) 의 RestClientConfig 도입 이후 잠복해 있던 버그로, `@RequiredArgsConstructor` 가 생성한 constructor parameter 에 필드의 `@Qualifier` 가 복사되지 않아 Spring 6.1 의 parameter-level annotation 기반 주입이 실패한 것. 수정: `backend/pom.xml` 의 `maven-compiler-plugin` 실행 설정에 `true` 명시 + `backend/src/main/java/lombok.config` 신설해 `lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier` 등록. 재빌드 후 bytecode `RuntimeVisibleParameterAnnotations` 에 `@Qualifier` 복사 확인, 운영 기동 `Started KcgAiApplication in 7.333 seconds` 복구 + ## [2026-04-17.3] ### 문서