diff --git a/axhub-gateway/src/main/resources/application-local.properties b/axhub-gateway/src/main/resources/application-local.properties index 2710743..977032d 100644 --- a/axhub-gateway/src/main/resources/application-local.properties +++ b/axhub-gateway/src/main/resources/application-local.properties @@ -6,13 +6,13 @@ spring.datasource.password=password spring.h2.console.enabled=true # EIMS 동적 라우팅 접속 정보 -eims.http.url=http://localhost:/api/gateway +eims.http.url=http://localhost:${server.port}/api/gateway eims.tcp.host=127.0.0.1 eims.tcp.port=8090 eims.tcp.timeout=5000 -eims.jsp.form.url=http://localhost:/mock/jsp-form -eims.jsp.json.url=http://localhost:/mock/jsp-json -eims.mci.url=http://localhost:/mock/esb/api +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}/mock/esb/api # API 보안 키 설정 mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 @@ -21,6 +21,12 @@ mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON mcp.security.tenant-domains.mcp-client-2=ALL # Gateway/Tool URLs -mcp.adapter.url=http://localhost:/rpc/v1/execute -mcp.gateway.url=http://localhost:/mcp/api/v1 +mcp.adapter.url=http://localhost:${server.port}/rpc/v1/execute +mcp.gateway.url=http://localhost:${server.port}/mcp/api/v1 mcp.tool.host=localhost + +# Disable Kafka +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-gateway/src/main/resources/application.properties b/axhub-gateway/src/main/resources/application.properties index 6a4ac49..f03eb7c 100644 --- a/axhub-gateway/src/main/resources/application.properties +++ b/axhub-gateway/src/main/resources/application.properties @@ -14,4 +14,6 @@ logging.level.com.corundumstudio.socketio=DEBUG # 우아한 종료 (Graceful Shutdown) 설정 server.shutdown=graceful -spring.lifecycle.timeout-per-shutdown-phase=20s \ No newline at end of file +spring.lifecycle.timeout-per-shutdown-phase=20s +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/annotation/McpTool.java b/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/annotation/McpTool.java index 0a2ddb1..30a1382 100644 --- a/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/annotation/McpTool.java +++ b/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/annotation/McpTool.java @@ -13,8 +13,6 @@ public @interface McpTool { @AliasFor(annotation = Component.class) String value() default ""; - String name(); - String description(); - String group() default "biz_core"; + String group() default "COMMON"; String routingType() default "HTTP"; } diff --git a/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/ToolScaffolder.java b/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/ToolScaffolder.java index 8fc2d76..fb19c52 100644 --- a/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/ToolScaffolder.java +++ b/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/ToolScaffolder.java @@ -107,9 +107,6 @@ public class ToolScaffolder { @Service @McpTool( - name = "%s", - description = "%s", - group = "%s", routingType = "%s" ) public class %sService extends AbstractMcpToolService { diff --git a/axhub-tool-email/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/email/EmailToolService.java b/axhub-tool-email/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/email/EmailToolService.java new file mode 100644 index 0000000..e9b9935 --- /dev/null +++ b/axhub-tool-email/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/email/EmailToolService.java @@ -0,0 +1,36 @@ +package io.shinhanlife.axhub.biz.mcp.tool.email; + +import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpFunction; +import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpTool; +import io.shinhanlife.axhub.biz.mcp.tool.dto.EmailSendReq; +import io.shinhanlife.axhub.biz.mcp.tool.service.AbstractMcpToolService; +import lombok.extern.slf4j.Slf4j; + +import java.util.HashMap; +import java.util.Map; + +@Slf4j +@McpTool(routingType = "EAI") +public class EmailToolService extends AbstractMcpToolService { + + @McpFunction(name = "send_email", description = "이메일 발송", prompt = "고객에게 이메일을 발송해줘.", mappingId = "EMAIL_SEND_001") + public Object sendEmail(EmailSendReq req) { + log.info("📧 [Email] 이메일 발송 요청 수신. 수신자: {}", req.getEmailAddress()); + + // EAI 연동을 위한 파라미터 변환 + Map payload = new HashMap<>(); + payload.put("address", req.getEmailAddress()); + payload.put("subject", req.getSubject()); + payload.put("content", req.getBody()); + + // 레거시 시스템 연동 (EAI) + Map result = executeLegacy("EAI", "EMAIL_SEND_001", payload); + + // 결과 가공 + if ("SUCCESS".equals(result.get("status"))) { + result.put("message", "이메일이 성공적으로 발송되었습니다."); + } + + return result; + } +} diff --git a/axhub-tool-email/src/main/resources/application-local.properties b/axhub-tool-email/src/main/resources/application-local.properties index 2710743..977032d 100644 --- a/axhub-tool-email/src/main/resources/application-local.properties +++ b/axhub-tool-email/src/main/resources/application-local.properties @@ -6,13 +6,13 @@ spring.datasource.password=password spring.h2.console.enabled=true # EIMS 동적 라우팅 접속 정보 -eims.http.url=http://localhost:/api/gateway +eims.http.url=http://localhost:${server.port}/api/gateway eims.tcp.host=127.0.0.1 eims.tcp.port=8090 eims.tcp.timeout=5000 -eims.jsp.form.url=http://localhost:/mock/jsp-form -eims.jsp.json.url=http://localhost:/mock/jsp-json -eims.mci.url=http://localhost:/mock/esb/api +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}/mock/esb/api # API 보안 키 설정 mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 @@ -21,6 +21,12 @@ mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON mcp.security.tenant-domains.mcp-client-2=ALL # Gateway/Tool URLs -mcp.adapter.url=http://localhost:/rpc/v1/execute -mcp.gateway.url=http://localhost:/mcp/api/v1 +mcp.adapter.url=http://localhost:${server.port}/rpc/v1/execute +mcp.gateway.url=http://localhost:${server.port}/mcp/api/v1 mcp.tool.host=localhost + +# Disable Kafka +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-tool-email/src/main/resources/application.properties b/axhub-tool-email/src/main/resources/application.properties index 4d238fe..a575430 100644 --- a/axhub-tool-email/src/main/resources/application.properties +++ b/axhub-tool-email/src/main/resources/application.properties @@ -2,3 +2,6 @@ server.port=8083 spring.application.name=axhub-tool-email spring.profiles.active=local + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BillingProcessService.java b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BillingProcessService.java index 06b1257..5582af2 100644 --- a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BillingProcessService.java +++ b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BillingProcessService.java @@ -10,9 +10,6 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.BillingStatusReq; import io.shinhanlife.axhub.biz.mcp.tool.dto.BillingProcessReq; @McpTool( - name = "billing_process_tool", - description = "청구 심사 및 처리 상태 툴", - group = "biz_channel", routingType = "MCI" ) @lombok.extern.slf4j.Slf4j diff --git a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BondIssueService.java b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BondIssueService.java index 279111f..36a40b0 100644 --- a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BondIssueService.java +++ b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/BondIssueService.java @@ -6,9 +6,6 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.BondCheckReq; import io.shinhanlife.axhub.biz.mcp.tool.dto.BondIssueReq; @McpTool( - name = "bond_issue_tool", - description = "디지털 증권 발행 가능 여부 조회 툴", - group = "biz_support", routingType = "EAI" ) public class BondIssueService extends AbstractMcpToolService { diff --git a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CommonUtilityService.java b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CommonUtilityService.java index 02b1259..88ed686 100644 --- a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CommonUtilityService.java +++ b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CommonUtilityService.java @@ -7,9 +7,6 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.LeaveCountReq; import io.shinhanlife.axhub.biz.mcp.tool.dto.LeaveCountReq; @McpTool( - name = "common_utility_tool", - description = "전사 공통 유틸리티 툴 (HR 및 알림)", - group = "biz_core", routingType = "HTTP" ) public class CommonUtilityService extends AbstractMcpToolService { diff --git a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/ContractInquiryService.java b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/ContractInquiryService.java index 682d6a8..d88a629 100644 --- a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/ContractInquiryService.java +++ b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/ContractInquiryService.java @@ -6,9 +6,6 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.ContractStatusReq; import io.shinhanlife.axhub.biz.mcp.tool.dto.ContractDetailReq; @McpTool( - name = "contract_inquiry_tool", - description = "계약 상태 및 상세 정보 조회 툴", - group = "biz_channel", routingType = "HTTP" ) public class ContractInquiryService extends AbstractMcpToolService { diff --git a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CustomerInfoService.java b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CustomerInfoService.java index 413b3a0..93dbfb3 100644 --- a/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CustomerInfoService.java +++ b/axhub-tool-other/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/CustomerInfoService.java @@ -6,9 +6,6 @@ import io.shinhanlife.axhub.biz.mcp.tool.dto.CustomerGradeReq; import io.shinhanlife.axhub.biz.mcp.tool.dto.CustomerDetailReq; @McpTool( - name = "customer_info_tool", - description = "고객 등급 및 상세 정보 조회 툴", - group = "biz_support", routingType = "TCP" ) public class CustomerInfoService extends AbstractMcpToolService { diff --git a/axhub-tool-other/src/main/resources/application-local.properties b/axhub-tool-other/src/main/resources/application-local.properties index 2710743..977032d 100644 --- a/axhub-tool-other/src/main/resources/application-local.properties +++ b/axhub-tool-other/src/main/resources/application-local.properties @@ -6,13 +6,13 @@ spring.datasource.password=password spring.h2.console.enabled=true # EIMS 동적 라우팅 접속 정보 -eims.http.url=http://localhost:/api/gateway +eims.http.url=http://localhost:${server.port}/api/gateway eims.tcp.host=127.0.0.1 eims.tcp.port=8090 eims.tcp.timeout=5000 -eims.jsp.form.url=http://localhost:/mock/jsp-form -eims.jsp.json.url=http://localhost:/mock/jsp-json -eims.mci.url=http://localhost:/mock/esb/api +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}/mock/esb/api # API 보안 키 설정 mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 @@ -21,6 +21,12 @@ mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON mcp.security.tenant-domains.mcp-client-2=ALL # Gateway/Tool URLs -mcp.adapter.url=http://localhost:/rpc/v1/execute -mcp.gateway.url=http://localhost:/mcp/api/v1 +mcp.adapter.url=http://localhost:${server.port}/rpc/v1/execute +mcp.gateway.url=http://localhost:${server.port}/mcp/api/v1 mcp.tool.host=localhost + +# Disable Kafka +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-tool-other/src/main/resources/application.properties b/axhub-tool-other/src/main/resources/application.properties index 77a7899..dca90a4 100644 --- a/axhub-tool-other/src/main/resources/application.properties +++ b/axhub-tool-other/src/main/resources/application.properties @@ -2,3 +2,6 @@ server.port=8084 spring.application.name=axhub-tool-other spring.profiles.active=local + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-tool-sms/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/sms/SmsToolService.java b/axhub-tool-sms/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/sms/SmsToolService.java new file mode 100644 index 0000000..f987ee7 --- /dev/null +++ b/axhub-tool-sms/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/sms/SmsToolService.java @@ -0,0 +1,35 @@ +package io.shinhanlife.axhub.biz.mcp.tool.sms; + +import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpFunction; +import io.shinhanlife.axhub.biz.mcp.tool.annotation.McpTool; +import io.shinhanlife.axhub.biz.mcp.tool.dto.SmsSendReq; +import io.shinhanlife.axhub.biz.mcp.tool.service.AbstractMcpToolService; +import lombok.extern.slf4j.Slf4j; + +import java.util.HashMap; +import java.util.Map; + +@Slf4j +@McpTool(routingType = "EAI") +public class SmsToolService extends AbstractMcpToolService { + + @McpFunction(name = "send_sms", description = "SMS 발송", prompt = "고객에게 SMS 메시지를 발송해줘.", mappingId = "SMS_SEND_001") + public Object sendSms(SmsSendReq req) { + log.info("📱 [SMS] SMS 발송 요청 수신. 수신자: {}", req.getPhoneNumber()); + + // EAI 연동을 위한 파라미터 변환 + Map payload = new HashMap<>(); + payload.put("phone", req.getPhoneNumber()); + payload.put("content", req.getMessage()); + + // 레거시 시스템 연동 (EAI) + Map result = executeLegacy("EAI", "SMS_SEND_001", payload); + + // 결과 가공 + if ("SUCCESS".equals(result.get("status"))) { + result.put("message", "SMS가 성공적으로 발송되었습니다."); + } + + return result; + } +} diff --git a/axhub-tool-sms/src/main/resources/application-local.properties b/axhub-tool-sms/src/main/resources/application-local.properties index 2710743..977032d 100644 --- a/axhub-tool-sms/src/main/resources/application-local.properties +++ b/axhub-tool-sms/src/main/resources/application-local.properties @@ -6,13 +6,13 @@ spring.datasource.password=password spring.h2.console.enabled=true # EIMS 동적 라우팅 접속 정보 -eims.http.url=http://localhost:/api/gateway +eims.http.url=http://localhost:${server.port}/api/gateway eims.tcp.host=127.0.0.1 eims.tcp.port=8090 eims.tcp.timeout=5000 -eims.jsp.form.url=http://localhost:/mock/jsp-form -eims.jsp.json.url=http://localhost:/mock/jsp-json -eims.mci.url=http://localhost:/mock/esb/api +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}/mock/esb/api # API 보안 키 설정 mcp.security.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 @@ -21,6 +21,12 @@ mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON mcp.security.tenant-domains.mcp-client-2=ALL # Gateway/Tool URLs -mcp.adapter.url=http://localhost:/rpc/v1/execute -mcp.gateway.url=http://localhost:/mcp/api/v1 +mcp.adapter.url=http://localhost:${server.port}/rpc/v1/execute +mcp.gateway.url=http://localhost:${server.port}/mcp/api/v1 mcp.tool.host=localhost + +# Disable Kafka +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR diff --git a/axhub-tool-sms/src/main/resources/application.properties b/axhub-tool-sms/src/main/resources/application.properties index 40b3e70..a068533 100644 --- a/axhub-tool-sms/src/main/resources/application.properties +++ b/axhub-tool-sms/src/main/resources/application.properties @@ -2,3 +2,6 @@ server.port=8082 spring.application.name=axhub-tool-sms spring.profiles.active=local + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR