feat(core, other): add MCI_STRING support and GlowTrgmField parser with sample tool

This commit is contained in:
jade
2026-07-09 13:20:43 +09:00
parent 4181a79cd8
commit bad6932f35
7 changed files with 268 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ public class LegacyEimsConnector {
private final EimsSender jspJsonEimsSender; // 41~50 (JSP JSON)
private final EimsSender mciEimsSender; // 실시간 연계 (기존 HTTP/TCP 대체, 동기식 API)
private final EimsSender mciStringEimsSender; // 실시간 연계 (String 전문 버전)
private final EimsSender eaiEimsSender; // 비동기/대용량 연계 (배치 통신 등)
private final ObjectMapper jsonMapper;
@@ -76,6 +77,10 @@ public class LegacyEimsConnector {
log.info("[라우팅] JSP JSON 통신으로 전달");
legacyResponse = jspJsonEimsSender.send(interfaceId, payload);
}
else if ("MCI_STRING".equalsIgnoreCase(routingType)) {
log.info("[라우팅] 실시간 AI 요청 -> MCI 연계 어댑터(String)를 통해 EIMS 전달");
legacyResponse = mciStringEimsSender.send(interfaceId, payload);
}
else {
// 3. 아키텍처 규격에 맞춘 라우팅 (실시간 vs 비동기)
if (isMciRouting(routingType, interfaceId)) {

View File

@@ -0,0 +1,58 @@
package io.shinhanlife.axhub.biz.mcp.adapter.sender;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.util.StopWatch;
import org.springframework.web.client.RestClient;
/**
* @package io.shinhanlife.axhub.biz.mcp.adapter.sender
* @className MciStringEimsSender
* @description AX HUB 시스템 처리 클래스
* @author 김형식
* @create 2026.09.01
* <pre>
* ---------- 개정이력 ----------
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2026.09.01 김형식 최초생성
*
* </pre>
*/
@Slf4j
@Service("mciStringEimsSender")
public class MciStringEimsSender implements EimsSender {
private final RestClient restClient;
private final String mciUrl;
public MciStringEimsSender(@Value("${eims.mci.url}") String mciUrl) {
this.mciUrl = mciUrl;
this.restClient = RestClient.create();
}
@Override
public String send(String interfaceId, String payload) throws Exception {
StopWatch stopWatch = new StopWatch(); stopWatch.start();
try {
log.info("🌐 [ESB 어댑터(String)] 전송 준비 완료 - RestClient 호출 시작 (Interface: {})", interfaceId);
String response = restClient.post()
.uri(mciUrl)
.contentType(MediaType.TEXT_PLAIN)
.body(payload != null ? payload : "")
.retrieve()
.body(String.class);
log.info("🌐 [ESB 어댑터(String)] 응답 수신 완료: {}", response);
return response != null ? response : "";
} finally {
stopWatch.stop();
log.info("📊 [SLA 모니터링 - MCI(String)] 소요시간: {} ms", stopWatch.getTotalTimeMillis());
}
}
}