forked from kimhyungsik/ax_hub_mcp_tool
feat: Add sms, email tool services and clean up McpTool annotation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -15,3 +15,5 @@ logging.level.com.corundumstudio.socketio=DEBUG
|
||||
# 우아한 종료 (Graceful Shutdown) 설정
|
||||
server.shutdown=graceful
|
||||
spring.lifecycle.timeout-per-shutdown-phase=20s
|
||||
# Suppress Kafka Connection Logs
|
||||
logging.level.org.apache.kafka=ERROR
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -107,9 +107,6 @@ public class ToolScaffolder {
|
||||
|
||||
@Service
|
||||
@McpTool(
|
||||
name = "%s",
|
||||
description = "%s",
|
||||
group = "%s",
|
||||
routingType = "%s"
|
||||
)
|
||||
public class %sService extends AbstractMcpToolService {
|
||||
|
||||
@@ -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<String, Object> payload = new HashMap<>();
|
||||
payload.put("address", req.getEmailAddress());
|
||||
payload.put("subject", req.getSubject());
|
||||
payload.put("content", req.getBody());
|
||||
|
||||
// 레거시 시스템 연동 (EAI)
|
||||
Map<String, Object> result = executeLegacy("EAI", "EMAIL_SEND_001", payload);
|
||||
|
||||
// 결과 가공
|
||||
if ("SUCCESS".equals(result.get("status"))) {
|
||||
result.put("message", "이메일이 성공적으로 발송되었습니다.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<String, Object> payload = new HashMap<>();
|
||||
payload.put("phone", req.getPhoneNumber());
|
||||
payload.put("content", req.getMessage());
|
||||
|
||||
// 레거시 시스템 연동 (EAI)
|
||||
Map<String, Object> result = executeLegacy("EAI", "SMS_SEND_001", payload);
|
||||
|
||||
// 결과 가공
|
||||
if ("SUCCESS".equals(result.get("status"))) {
|
||||
result.put("message", "SMS가 성공적으로 발송되었습니다.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user