diff --git a/.gitattributes b/.gitattributes index 9765d37..18fe307 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,3 +23,24 @@ gradlew text eol=lf *.pdf binary *.zip binary *.tar.gz binary + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/.gitignore b/.gitignore index 5fa286e..9ed9fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,24 @@ ehthumbs.db # ===== 환경설정 (민감정보 분리 시) ===== # application-local.properties # application-secret.properties + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/AddJavadoc.java b/AddJavadoc.java index 6d174a4..d277b19 100644 --- a/AddJavadoc.java +++ b/AddJavadoc.java @@ -101,3 +101,24 @@ public class AddJavadoc { System.out.println("Updated: " + file); } } + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/Dockerfile b/Dockerfile index 412618c..3950d86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,3 +28,24 @@ EXPOSE 8081 # 컨테이너 실행 시 JAR 실행 ENTRYPOINT ["java", "-jar", "app.jar"] + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/HELP.md b/HELP.md index 09862f4..5c4fae7 100644 --- a/HELP.md +++ b/HELP.md @@ -30,3 +30,24 @@ While most of the inheritance is fine, it also inherits unwanted elements like ` To prevent this, the project POM contains empty overrides for these elements. If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides. + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/McpBridge.java b/McpBridge.java index 14e197a..e573b6e 100644 --- a/McpBridge.java +++ b/McpBridge.java @@ -44,3 +44,24 @@ public class McpBridge { + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/README.md b/README.md index 217633d..d6f2e75 100644 --- a/README.md +++ b/README.md @@ -175,3 +175,24 @@ axhub-backend-main (Root) ``` *(참고: 기존 단일 모듈 프로젝트에서 마이크로서비스 확장을 위해 모듈별로 분리되었으며, 각 Tool 서버는 독립적으로 확장 및 배포할 수 있습니다.)* + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/config/ShinhanIntegrationProperties.java b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/config/ShinhanIntegrationProperties.java new file mode 100644 index 0000000..990be1e --- /dev/null +++ b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/config/ShinhanIntegrationProperties.java @@ -0,0 +1,43 @@ +package io.shinhanlife.axhub.common.integration.mci.config; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * @package io.shinhanlife.axhub.common.integration.mci.config + * @className ShinhanIntegrationProperties + * @description AX HUB 시스템 처리 클래스 + * @author 김형식 + * @create 2026.09.01 + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ * 2026.09.01  김형식    최초생성
+ * 
+ * 
+ */ +@Getter +@Setter +@Configuration +@ConfigurationProperties(prefix = "shinhan.integration") +public class ShinhanIntegrationProperties { + + /** + * 환경유형코드: 운영(R), 테스트(T), 개발(D) + */ + private String envrTypeCd = "D"; + + private ServerInfo eai = new ServerInfo(); + private ServerInfo internalMci = new ServerInfo(); + private ServerInfo externalMci = new ServerInfo(); + private ServerInfo bancaMci = new ServerInfo(); + + @Getter + @Setter + public static class ServerInfo { + private String url; + } +} diff --git a/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/MciRequestWrapper.java b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/MciRequestWrapper.java new file mode 100644 index 0000000..2b6217f --- /dev/null +++ b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/MciRequestWrapper.java @@ -0,0 +1,33 @@ +package io.shinhanlife.axhub.common.integration.mci.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @package io.shinhanlife.axhub.common.integration.mci.dto + * @className MciRequestWrapper + * @description AX HUB 시스템 처리 클래스 + * @author 김형식 + * @create 2026.09.01 + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ * 2026.09.01  김형식    최초생성
+ * 
+ * 
+ */ +import com.fasterxml.jackson.annotation.JsonUnwrapped; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MciRequestWrapper { + private ShinhanCommonHeaderDto tgrmCmnnhddValu; + + @JsonUnwrapped + private T body; +} diff --git a/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/MciResponseWrapper.java b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/MciResponseWrapper.java new file mode 100644 index 0000000..e59bc0a --- /dev/null +++ b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/MciResponseWrapper.java @@ -0,0 +1,32 @@ +package io.shinhanlife.axhub.common.integration.mci.dto; + +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @package io.shinhanlife.axhub.common.integration.mci.dto + * @className MciResponseWrapper + * @description AX HUB 시스템 처리 클래스 + * @author 김형식 + * @create 2026.09.01 + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ * 2026.09.01  김형식    최초생성
+ * 
+ * 
+ */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MciResponseWrapper { + private ShinhanCommonHeaderDto tgrmCmnnhddValu; + + @JsonUnwrapped + private T body; +} diff --git a/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/ShinhanCommonHeaderDto.java b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/ShinhanCommonHeaderDto.java new file mode 100644 index 0000000..cca7538 --- /dev/null +++ b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/dto/ShinhanCommonHeaderDto.java @@ -0,0 +1,47 @@ +package io.shinhanlife.axhub.common.integration.mci.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @package io.shinhanlife.axhub.common.integration.mci.dto + * @className ShinhanCommonHeaderDto + * @description AX HUB 시스템 처리 클래스 + * @author 김형식 + * @create 2026.09.01 + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ * 2026.09.01  김형식    최초생성
+ * 
+ * 
+ */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ShinhanCommonHeaderDto { + + private String glbId; // 전사공통키 (37 Byte) + private String pgrsSriaNo; // 진행일련번호 + private String trgmVrsnInfoValu; // 전문버전정보값 + private String tgrmEncrYn; // 전문암호화여부 + private String gpcpCd; // 글로벌법인코드 + private String appliDutjCd; // 어플리케이션업무코드 + private String rcvSvcId; // 수신서비스ID + private String envrTypeCd; // 환경유형코드 (D/T/R) + private String reqRspnScCd; // 요청응답구분코드 (S:요청, R:응답) + private String tnsmTypeCd; // 전송유형코드 + private String inqrTraTypeCd; // 조회거래유형코드 + private String reqTgrmTnsmDtptDt; // 요청전문전송일시 + private String itrIfId; // 인터페이스ID + + // 대외 연계 정보 (선택) + private String frbuCd; // 대외기관코드 + private String cmouDutjCd; // 대외업무코드 + private String cmouCssfCd; // 대외종별코드 + private String cmouTraCd; // 대외거래코드 +} diff --git a/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/sender/ShinhanMciSender.java b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/sender/ShinhanMciSender.java new file mode 100644 index 0000000..6605597 --- /dev/null +++ b/axhub-common/src/main/java/io/shinhanlife/axhub/common/integration/mci/sender/ShinhanMciSender.java @@ -0,0 +1,105 @@ +package io.shinhanlife.axhub.common.integration.mci.sender; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.shinhanlife.axhub.common.integration.mci.config.ShinhanIntegrationProperties; +import io.shinhanlife.axhub.common.integration.mci.dto.MciRequestWrapper; +import io.shinhanlife.axhub.common.integration.mci.dto.ShinhanCommonHeaderDto; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Service; +import org.springframework.util.StopWatch; +import org.springframework.web.client.RestClient; + +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @package io.shinhanlife.axhub.common.integration.mci.sender + * @className ShinhanMciSender + * @description AX HUB 시스템 처리 클래스 + * @author 김형식 + * @create 2026.09.01 + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ * 2026.09.01  김형식    최초생성
+ * 
+ * 
+ */ +@Slf4j +@Service +public class ShinhanMciSender { + + private final ObjectMapper jsonMapper; + private final RestClient restClient; + private final ShinhanIntegrationProperties properties; + private final AtomicInteger sequenceGenerator = new AtomicInteger(1); + + public ShinhanMciSender(ObjectMapper jsonMapper, ShinhanIntegrationProperties properties) { + this.jsonMapper = jsonMapper; + this.properties = properties; + this.restClient = RestClient.create(); + } + + public String send(String targetUrl, MciRequestWrapper requestWrapper) throws Exception { + StopWatch stopWatch = new StopWatch(); + stopWatch.start(); + + try { + ShinhanCommonHeaderDto header = requestWrapper.getTgrmCmnnhddValu(); + if (header == null) { + header = new ShinhanCommonHeaderDto(); + requestWrapper.setTgrmCmnnhddValu(header); + } + + // 필수 헤더 자동 세팅 로직 + header.setEnvrTypeCd(properties.getEnvrTypeCd()); + header.setReqRspnScCd("S"); // S: 요청 + + if (header.getGlbId() == null || header.getGlbId().isEmpty()) { + header.setGlbId(generateGlbId()); + } + + int currentSeq = sequenceGenerator.getAndIncrement(); + header.setPgrsSriaNo(String.format("%03d", currentSeq)); // 3자리 + + if (header.getReqTgrmTnsmDtptDt() == null) { + header.setReqTgrmTnsmDtptDt(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"))); + } + + String jsonPayload = jsonMapper.writeValueAsString(requestWrapper); + + log.info(" [신한 통합 MCI 어댑터] 전송 준비 완료 - URL: {}", targetUrl); + log.debug(" [신한 통합 MCI 어댑터] 요청 Payload: {}", jsonPayload); + + String responseJson = restClient.post() + .uri(targetUrl) + .contentType(MediaType.APPLICATION_JSON) + .body(jsonPayload) + .retrieve() + .body(String.class); + + log.info(" [신한 통합 MCI 어댑터] 응답 수신 완료"); + log.debug(" [신한 통합 MCI 어댑터] 응답 Payload: {}", responseJson); + + return responseJson; + + } finally { + stopWatch.stop(); + log.info(" [SLA 모니터링 - MCI 연계] 소요시간: {} ms", stopWatch.getTotalTimeMillis()); + } + } + + private String generateGlbId() { + // 전사공통키 (37 Byte) + // 전문생성상세일시(17) + 전문생성시스템명(9) + 어플리케이션업무코드(3) + 전문세션번호(8) + String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")); // 17 byte + String systemName = String.format("%-9s", "AXHUB"); // 9 byte, left-aligned padded with spaces + String appCode = "AXH"; // 3 byte + String sessionNo = UUID.randomUUID().toString().substring(0, 8).toUpperCase(); // 8 byte + return timestamp + systemName + appCode + sessionNo; + } +} diff --git a/axhub-common/src/test/java/io/shinhanlife/axhub/common/integration/mci/ShinhanMciSenderTest.java b/axhub-common/src/test/java/io/shinhanlife/axhub/common/integration/mci/ShinhanMciSenderTest.java new file mode 100644 index 0000000..f07be02 --- /dev/null +++ b/axhub-common/src/test/java/io/shinhanlife/axhub/common/integration/mci/ShinhanMciSenderTest.java @@ -0,0 +1,60 @@ +package io.shinhanlife.axhub.common.integration.mci; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.shinhanlife.axhub.common.integration.mci.dto.MciRequestWrapper; +import io.shinhanlife.axhub.common.integration.mci.dto.ShinhanCommonHeaderDto; +import lombok.Data; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * @package io.shinhanlife.axhub.common.integration.mci + * @className ShinhanMciSenderTest + * @description AX HUB 시스템 처리 클래스 + * @author 김형식 + * @create 2026.09.01 + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ * 2026.09.01  김형식    최초생성
+ * 
+ * 
+ */ +class ShinhanMciSenderTest { + + @Data + static class SampleBody { + private String msgCd; + private String anxMsgCt; + } + + @Test + void testJsonUnwrapped() throws Exception { + ObjectMapper mapper = new ObjectMapper(); + + ShinhanCommonHeaderDto header = new ShinhanCommonHeaderDto(); + header.setGlbId("20211115150135679009808815NCS17007887"); + header.setPgrsSriaNo("002"); + header.setItrIfId("NCSBACO00001"); + + SampleBody body = new SampleBody(); + body.setMsgCd("12345"); + body.setAnxMsgCt("Test Message"); + + MciRequestWrapper wrapper = new MciRequestWrapper<>(); + wrapper.setTgrmCmnnhddValu(header); + wrapper.setBody(body); + + String json = mapper.writeValueAsString(wrapper); + + System.out.println(json); + + // 검증: body 필드가 json root 레벨에 평탄화되어 있는지 확인 + assertThat(json).contains("\"tgrmCmnnhddValu\":{"); + assertThat(json).contains("\"msgCd\":\"12345\""); + assertThat(json).contains("\"anxMsgCt\":\"Test Message\""); + assertThat(json).doesNotContain("\"body\":"); + } +} diff --git a/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/sync/CustomWebMvcSseServerTransportProvider.java b/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/sync/CustomWebMvcSseServerTransportProvider.java index 4df5344..11ec356 100644 --- a/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/sync/CustomWebMvcSseServerTransportProvider.java +++ b/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/sync/CustomWebMvcSseServerTransportProvider.java @@ -86,6 +86,7 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor } public org.springframework.http.ResponseEntity handleMessage(String sessionId, String body) { + log.info("Received POST message for sessionId: " + sessionId + ", body: " + body); if (sessionId == null || !sessions.containsKey(sessionId)) { return org.springframework.http.ResponseEntity.badRequest().body("Missing or invalid sessionId"); } @@ -104,10 +105,13 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor } else { message = objectMapper.convertValue(map, io.modelcontextprotocol.spec.McpSchema.JSONRPCNotification.class); } + log.info("Converted message type: " + message.getClass().getName()); session.handle(message).subscribe(); + log.info("Message sent to session handler"); return org.springframework.http.ResponseEntity.ok().build(); } catch (Exception e) { + log.error("Failed to handle message", e); return org.springframework.http.ResponseEntity.status(500).body(e.getMessage()); } } @@ -124,11 +128,15 @@ public class CustomWebMvcSseServerTransportProvider implements McpServerTranspor @Override public Mono sendMessage(McpSchema.JSONRPCMessage message) { return Mono.fromRunnable(() -> { + log.info("Sending message to SSE stream: " + message.getClass().getName()); try { String json = objectMapper.writeValueAsString(message); + log.info("Serialized message: " + json); emitter.send(org.springframework.web.servlet.mvc.method.annotation.SseEmitter.event().name("message").data(json)); + log.info("Message successfully sent to SSE emitter"); } catch (Exception e) { - throw new RuntimeException(e); + log.error("Error sending message to SSE emitter", e); + emitter.completeWithError(e); } }); } diff --git a/axhub-gateway/src/main/resources/application-dev.properties b/axhub-gateway/src/main/resources/application-dev.properties index 26ad9a1..a7286f5 100644 --- a/axhub-gateway/src/main/resources/application-dev.properties +++ b/axhub-gateway/src/main/resources/application-dev.properties @@ -10,3 +10,10 @@ mcp.gateway.fallback.routes.email=https://axhub-tool-email.onrender.com mcp.gateway.fallback.default-url=https://axhub-tool-other.onrender.com mcp.gateway.fallback.routes.payment=https://axhub-tool-payment.onrender.com mcp.gateway.fallback.routes.hr=https://axhub-tool-hr.onrender.com + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 diff --git a/axhub-gateway/src/main/resources/application-prod.properties b/axhub-gateway/src/main/resources/application-prod.properties index fb4a354..29cd624 100644 --- a/axhub-gateway/src/main/resources/application-prod.properties +++ b/axhub-gateway/src/main/resources/application-prod.properties @@ -3,3 +3,10 @@ # spring.datasource.driverClassName=oracle.jdbc.OracleDriver # spring.datasource.username=prod_user # spring.datasource.password=prod_password + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/axhub-tool-email/src/main/resources/application-dev.properties b/axhub-tool-email/src/main/resources/application-dev.properties index 3d24cd8..128ac93 100644 --- a/axhub-tool-email/src/main/resources/application-dev.properties +++ b/axhub-tool-email/src/main/resources/application-dev.properties @@ -12,3 +12,10 @@ eims.jsp.form.url=http://localhost:${server.port}/mock/jsp-form eims.jsp.json.url=http://localhost:${server.port}/mock/jsp-json eims.mci.url=http://localhost:${server.port}/api/mock/esb/api eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 diff --git a/axhub-tool-other/src/main/resources/application-dev.properties b/axhub-tool-other/src/main/resources/application-dev.properties index 3762854..c3291f2 100644 --- a/axhub-tool-other/src/main/resources/application-dev.properties +++ b/axhub-tool-other/src/main/resources/application-dev.properties @@ -12,3 +12,10 @@ eims.jsp.form.url=http://localhost:${server.port}/mock/jsp-form eims.jsp.json.url=http://localhost:${server.port}/mock/jsp-json eims.mci.url=http://localhost:${server.port}/api/mock/esb/api eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 diff --git a/axhub-tool-payment/src/main/resources/application-dev.properties b/axhub-tool-payment/src/main/resources/application-dev.properties index 54a7e51..5904c40 100644 --- a/axhub-tool-payment/src/main/resources/application-dev.properties +++ b/axhub-tool-payment/src/main/resources/application-dev.properties @@ -12,3 +12,10 @@ eims.jsp.form.url=http://localhost:${server.port}/mock/jsp-form eims.jsp.json.url=http://localhost:${server.port}/mock/jsp-json eims.mci.url=http://localhost:${server.port}/api/mock/esb/api eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 diff --git a/axhub-tool-sms/src/main/resources/application-dev.properties b/axhub-tool-sms/src/main/resources/application-dev.properties index 194c599..caffd5b 100644 --- a/axhub-tool-sms/src/main/resources/application-dev.properties +++ b/axhub-tool-sms/src/main/resources/application-dev.properties @@ -12,3 +12,10 @@ eims.jsp.form.url=http://localhost:${server.port}/mock/jsp-form eims.jsp.json.url=http://localhost:${server.port}/mock/jsp-json eims.mci.url=http://localhost:${server.port}/api/mock/esb/api eims.mcistring.url=http://localhost:${server.port}/api/mock/esb/string + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 diff --git a/build.gradle b/build.gradle index 9e0a217..fca985e 100644 --- a/build.gradle +++ b/build.gradle @@ -49,3 +49,24 @@ subprojects { useJUnitPlatform() } } + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/docker-compose.yml b/docker-compose.yml index 48db10d..a1ff8f6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -121,3 +121,24 @@ services: - GLOW_COMMUNICATION_EXTMCI_PORT=8080 - GLOW_COMMUNICATION_EAI_HOST=http://mci-mock - GLOW_COMMUNICATION_EAI_PORT=8080 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/gradlew b/gradlew index 0f14772..ba3aefb 100644 --- a/gradlew +++ b/gradlew @@ -249,3 +249,24 @@ eval "set -- $( )" '"$@"' exec "$JAVACMD" "$@" + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/gradlew.bat b/gradlew.bat index 8de1053..0c97524 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -92,3 +92,24 @@ exit /b %EXIT_CODE% if "%OS%"=="Windows_NT" endlocal :omega + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/settings.gradle b/settings.gradle index 0d4283d..b6047b9 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,3 +7,24 @@ include 'axhub-tool-sms' include 'axhub-tool-email' include 'axhub-tool-other' include 'axhub-tool-payment' + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/sql.txt b/sql.txt index 2e28ac9..8758bfd 100644 --- a/sql.txt +++ b/sql.txt @@ -280,4 +280,24 @@ COMMENT ON COLUMN ZT_MENU_AUTH.SYST_CHG_DT IS '시스템변경일시'; COMMENT ON COLUMN ZT_MENU_AUTH.SYST_CHG_PRAF_NO IS '시스템변경인사번호'; COMMENT ON COLUMN ZT_MENU_AUTH.SYST_CHG_OGNZ_NO IS '시스템변경조직번호'; COMMENT ON COLUMN ZT_MENU_AUTH.SYST_CHG_SYST_CD IS '시스템변경시스템코드'; -COMMENT ON COLUMN ZT_MENU_AUTH.SYST_CHG_PRGR_ID IS '시스템변경프로그램ID'; \ No newline at end of file +COMMENT ON COLUMN ZT_MENU_AUTH.SYST_CHG_PRGR_ID IS '시스템변경프로그램ID'; +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177 diff --git a/sse_out.txt b/sse_out.txt new file mode 100644 index 0000000..4ffeb89 Binary files /dev/null and b/sse_out.txt differ diff --git a/test_payload.json b/test_payload.json new file mode 100644 index 0000000..d451825 --- /dev/null +++ b/test_payload.json @@ -0,0 +1,22 @@ +{"jsonrpc":"2.0","method":"tools/list","id":1} + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=D +shinhan.integration.eai.url=http://10.176.32.181 +shinhan.integration.internalMci.url=http://10.176.32.173 +shinhan.integration.bancaMci.url=http://10.176.32.117 +shinhan.integration.externalMci.url=http://10.176.32.176 + +# --- Ѷ EAI/MCI IP (׽Ʈ ȯ) --- +shinhan.integration.envrTypeCd=T +shinhan.integration.eai.url=http://10.174.32.181 +shinhan.integration.internalMci.url=http://10.174.32.173 +shinhan.integration.bancaMci.url=http://10.174.32.117 +shinhan.integration.externalMci.url=http://10.176.32.177 + +# --- Ѷ EAI/MCI IP ( ȯ) --- +shinhan.integration.envrTypeCd=R +shinhan.integration.eai.url=http://10.172.32.181 +shinhan.integration.internalMci.url=http://10.172.32.173 +shinhan.integration.bancaMci.url=http://10.172.32.117 +shinhan.integration.externalMci.url=http://10.172.32.177