refactor: 어플리케이션 업무코드(DAP) 전면 전환에 따른 패키지 및 모듈명 대규모 리팩토링

This commit is contained in:
jade
2026-07-16 16:18:04 +09:00
parent 6159b0856a
commit a82bc1a196
285 changed files with 782 additions and 782 deletions

18
dap-tool-email/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM eclipse-temurin:21-jdk-alpine AS builder
WORKDIR /app
COPY gradlew .
COPY gradle gradle
COPY build.gradle settings.gradle ./
COPY dap-common dap-common
COPY dap-tool-core dap-tool-core
COPY dap-tool-email dap-tool-email
RUN chmod +x gradlew
RUN ./gradlew :dap-tool-email:build -x test
FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
RUN apk add --no-cache tzdata
ENV TZ=Asia/Seoul
COPY --from=builder /app/dap-tool-email/build/libs/*-SNAPSHOT.jar app.jar
EXPOSE 8083
ENTRYPOINT ["java", "-jar", "app.jar"]

View File

@@ -0,0 +1,12 @@
plugins {
id 'org.springframework.boot'
}
dependencies {
implementation project(':dap-tool-core')
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.32'
annotationProcessor 'org.projectlombok:lombok:1.18.32'
}

View File

@@ -0,0 +1,40 @@
package io.shinhanlife.dap.biz.mcp.tool.dto;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import io.shinhanlife.dap.biz.mcp.tool.annotation.McpParameter;
import lombok.Getter;
import lombok.Setter;
/**
* @package io.shinhanlife.dap.biz.mcp.tool.dto
* @className EmailSendReq
* @description AX HUB 시스템 처리 클래스
* @author 김형식
* @create 2026.09.01
* <pre>
* ---------- 개정이력 ----------
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2026.09.01 김형식 최초생성
*
* </pre>
*/
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EmailSendReq {
@McpParameter(description = "수신자 이메일 주소", required = true)
private String emailAddress;
@McpParameter(description = "이메일 제목", required = true)
private String subject;
@McpParameter(description = "이메일 본문 내용", required = true)
private String body;
}

View File

@@ -0,0 +1,15 @@
package io.shinhanlife.dap.biz.mcp.tool.email;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.cache.annotation.EnableCaching;
@SpringBootApplication(scanBasePackages = {"io.shinhanlife.dap.biz.mcp.tool", "io.shinhanlife.dap.biz.mcp.adapter", "io.shinhanlife.dap.common.mcp", "io.shinhanlife.dap.common.config"})
@ConfigurationPropertiesScan(basePackages = {"io.shinhanlife.dap.biz.mcp.tool", "io.shinhanlife.dap.biz.mcp.adapter", "io.shinhanlife.dap.common.mcp", "io.shinhanlife.dap.common.config"})
@EnableCaching
public class AxHubToolEmailApplication {
public static void main(String[] args) {
SpringApplication.run(AxHubToolEmailApplication.class, args);
}
}

View File

@@ -0,0 +1,49 @@
package io.shinhanlife.dap.biz.mcp.tool.service;
import io.shinhanlife.dap.biz.mcp.tool.annotation.McpFunction;
import io.shinhanlife.dap.biz.mcp.tool.annotation.McpTool;
import io.shinhanlife.dap.biz.mcp.tool.dto.EmailSendReq;
import lombok.extern.slf4j.Slf4j;
import java.util.HashMap;
import java.util.Map;
/**
* @package io.shinhanlife.dap.biz.mcp.tool.email
* @className EmailToolService
* @description AX HUB 시스템 처리 클래스
* @author 김형식
* @create 2026.09.01
* <pre>
* ---------- 개정이력 ----------
* 수정일 수정자 수정내용
* ---------- -------- ---------------------------
* 2026.09.01 김형식 최초생성
*
* </pre>
*/
@Slf4j
@McpTool(routingType = "EAI", categoryKey = "notification")
public class EmailToolService extends AbstractMcpToolService {
@McpFunction(displayName = "send_email 툴", 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;
}
}

View File

@@ -0,0 +1,21 @@
# Render 클라우드 환경 전용 설정
server.port=${PORT:8083}
axhub.gateway.url=https://dap-gateway.onrender.com
axhub.tool.url=https://dap-tool-email.onrender.com
# EIMS 동적 라우팅 접속 정보 (Mock)
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:${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

View File

@@ -0,0 +1,26 @@
# Local 환경 전용 설정 (H2 메모리 DB 등)
spring.datasource.url=jdbc:p6spy:h2:mem:testdb;DB_CLOSE_DELAY=-1;
spring.datasource.driverClassName=com.p6spy.engine.spy.P6SpyDriver
spring.datasource.username=sa
spring.datasource.password=password
spring.h2.console.enabled=true
# EIMS 동적 라우팅 접속 정보
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:${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
# Gateway/Tool URLs
axhub.gateway.url=http://localhost:8081
axhub.tool.url=http://localhost:${server.port}
# Disable Kafka
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration
# Suppress Kafka Connection Logs
logging.level.org.apache.kafka=ERROR

View File

@@ -0,0 +1,5 @@
spring:
config:
import: "classpath:config/application-glow-local.yml"

View File

@@ -0,0 +1,13 @@
server.port=8083
spring.application.name=dap-tool-email
spring.profiles.active=local
# Suppress Kafka Connection Logs
logging.level.org.apache.kafka=ERROR
# Auto Prefix Namespace
mcp.namespace=email
# API 보안 키 설정
mcp.security.tenant-domains.TESTER-DEV=ALL

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 1. 로그 패턴 설정 (MDC traceId 포함) -->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] %-5level %logger{36} - %msg%n" />
<!-- 2. 콘솔(Console) 출력 설정 (로컬 개발용) -->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 3. 파일(File) 출력 설정 (서버 운영용) -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/axhub-tool-email.log</file> <!-- 현재 로그가 쌓이는 파일 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 매일 자정에 날짜를 붙여서 지난 로그를 분리 저장 -->
<fileNamePattern>logs/axhub-tool-email-%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 최대 30일치 로그만 보관하고 오래된 것은 자동 삭제 -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 4. 기본 로깅 레벨 설정 -->
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
<!-- 5. 우리 프로젝트 패키지는 디버그 레벨까지 상세히 보기 -->
<logger name="io.shinhanlife" level="DEBUG" />
</configuration>