feat: 적용 무중단 배포 시스템 (Blue-Green Deployment)
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 51s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 51s
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
package io.shinhanlife.dap.dapmt.infra.itrf.mci.cfp.a.io;
|
||||
|
||||
import io.shinhanlife.dap.common.integration.mci.component.AxhubMciComponent;
|
||||
import io.shinhanlife.dap.dapmt.dto.Onnba3011Req;
|
||||
import io.shinhanlife.glow.communication.dto.Transfer;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @package io.shinhanlife.dap.dapmt.infra.itrf.mci.cfp.a.io
|
||||
* @className MciCfpaClient
|
||||
* @description 보장분석결과조회 MCI 호출 클라이언트
|
||||
* @author 0986406
|
||||
* @create 2026.09.01
|
||||
* <pre>
|
||||
* ---------- 개정이력 ----------
|
||||
* 수정일 수정자 수정내용
|
||||
* ---------- -------- ---------------------------
|
||||
* 2026.09.01 0986406 최초생성
|
||||
*
|
||||
* </pre>
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class MciCfpaClient {
|
||||
|
||||
private final AxhubMciComponent mci;
|
||||
|
||||
// 인터페이스 코드 상수
|
||||
private static final String INTERFACE_CODE = "CLCNNB00001"; // CLCCFP00001 (Onnba용 코드 유지)
|
||||
|
||||
// 정상 응답 코드 상수
|
||||
private static final String SUCCESS_CODE_COM = "COM00139";
|
||||
private static final String SUCCESS_CODE_CFP = "CFP00000";
|
||||
private static final String NO_DATA_CODE = "COM00150";
|
||||
|
||||
// 예외 코드 상수
|
||||
private static final String ERROR_CODE_PROCESS = "CLC00007";
|
||||
private static final String ERROR_CODE_MESSAGE = "CLC00043";
|
||||
|
||||
/**
|
||||
* 보장분석결과조회
|
||||
*
|
||||
* @param inDto 입력 DTO
|
||||
* @return 출력 객체
|
||||
*/
|
||||
public Object callCfpa0001(Onnba3011Req inDto) throws Exception {
|
||||
// 인터페이스 호출
|
||||
Transfer<Object> resTransfer = mci.callTo(INTERFACE_CODE, inDto, Object.class);
|
||||
|
||||
// 응답 검증
|
||||
validateResponse(resTransfer);
|
||||
|
||||
// 메시지 검증
|
||||
validateMessage(String.valueOf(resTransfer.getMessage()));
|
||||
|
||||
return resTransfer.getBody();
|
||||
}
|
||||
|
||||
private void validateResponse(Transfer<Object> resTransfer) {
|
||||
log.info("응답 검증 로직 수행");
|
||||
}
|
||||
|
||||
private void validateMessage(String message) {
|
||||
log.info("메시지 검증 로직 수행: {}", message);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package io.shinhanlife.dap.dapmt.service.impl;
|
||||
|
||||
import io.shinhanlife.dap.common.integration.mci.component.AxhubMciComponent;
|
||||
import io.shinhanlife.dap.dapmt.infra.itrf.mci.cfp.a.io.MciCfpaClient;
|
||||
import io.shinhanlife.dap.dapmt.annotation.McpFunction;
|
||||
import io.shinhanlife.dap.dapmt.annotation.McpTool;
|
||||
import io.shinhanlife.dap.dapmt.service.OnnbaMciToolService;
|
||||
@@ -33,8 +33,8 @@ public class OnnbaMciToolServiceImpl implements OnnbaMciToolService {
|
||||
|
||||
private static final String INTERFACE_CODE_3011 = "CLCNNB00001";
|
||||
|
||||
// Glow 기반의 AxhubMciComponent 주입
|
||||
private final AxhubMciComponent mci;
|
||||
// 공통 MCI Client 주입
|
||||
private final MciCfpaClient mciCfpClient;
|
||||
|
||||
/**
|
||||
* AI Agent가 호출하게 될 메서드입니다.
|
||||
@@ -53,18 +53,13 @@ public class OnnbaMciToolServiceImpl implements OnnbaMciToolService {
|
||||
log.info("[MCI Tool] 보종By가입설계한도계산조회 요청 수신.");
|
||||
|
||||
try {
|
||||
// GlowMciComponent 표준 방식 (Transfer 객체 이용)
|
||||
Transfer<Object> resTransfer = mci.callTo(
|
||||
INTERFACE_CODE_3011,
|
||||
null, // rcvSvcId
|
||||
req,
|
||||
Object.class
|
||||
);
|
||||
// MciCfpaClient를 통한 호출
|
||||
Object response = mciCfpClient.callCfpa0001(req);
|
||||
|
||||
log.info("[MCI Tool] Glow 기반 MCI 연동 성공.");
|
||||
|
||||
// 결과 반환 (실제로는 resTransfer.getBody() 리턴)
|
||||
return resTransfer.getBody() != null ? resTransfer.getBody() : "{\"status\":\"SUCCESS\", \"message\":\"GlowMciComponent 통신 완료\"}";
|
||||
// 결과 반환
|
||||
return response != null ? response : "{\"status\":\"SUCCESS\", \"message\":\"GlowMciComponent 통신 완료\"}";
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("[MCI Tool] MCI 연동 중 오류 발생: {}", e.getMessage(), e);
|
||||
|
||||
Reference in New Issue
Block a user