diff --git a/axhub-common/src/main/java/io/shinhanlife/axhub/common/util/ToolScaffolder.java b/axhub-common/src/main/java/io/shinhanlife/axhub/common/util/ToolScaffolder.java index 847552d..a5ccd14 100644 --- a/axhub-common/src/main/java/io/shinhanlife/axhub/common/util/ToolScaffolder.java +++ b/axhub-common/src/main/java/io/shinhanlife/axhub/common/util/ToolScaffolder.java @@ -81,6 +81,7 @@ public class ToolScaffolder { } public static String scaffold(String baseName, String interfaceId, String description, String group, String routingType, String moduleName, String author, String createDate, boolean register) throws IOException { + baseName = toPascalCase(baseName); String envSourceDir = System.getenv("AXHUB_SOURCE_DIR"); Path rootDir = envSourceDir != null ? Paths.get(envSourceDir) : Paths.get("."); @@ -224,4 +225,26 @@ public class ToolScaffolder { return log.toString(); } + + private static String toPascalCase(String str) { + if (str == null || str.isEmpty()) { + return str; + } + StringBuilder result = new StringBuilder(); + boolean capitalizeNext = true; + for (char c : str.toCharArray()) { + if (c == '_' || c == '-' || c == ' ') { + capitalizeNext = true; + } else if (capitalizeNext) { + result.append(Character.toUpperCase(c)); + capitalizeNext = false; + } else { + result.append(c); + } + } + if (result.length() > 0) { + result.setCharAt(0, Character.toUpperCase(result.charAt(0))); + } + return result.toString(); + } } \ No newline at end of file diff --git a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/hr_testReq.java b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/HrTestReq.java similarity index 82% rename from axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/hr_testReq.java rename to axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/HrTestReq.java index ac1730f..8770b0b 100644 --- a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/hr_testReq.java +++ b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/HrTestReq.java @@ -5,20 +5,20 @@ import lombok.Data; /** * @package io.shinhanlife.axhub.biz.mcp.tool.dto - * @className hr_testReq + * @className HrTestReq * @description AX HUB 시스템 처리 클래스 - * @author root + * @author system * @create 2026.07.13 *
* ---------- 개정이력 ---------- * 수정일 수정자 수정내용 * ---------- -------- --------------------------- - * 2026.07.13 root 최초생성 + * 2026.07.13 system 최초생성 * **/ @Data @JsonInclude(JsonInclude.Include.NON_NULL) -public class hr_testReq { +public class HrTestReq { // TODO: Add request fields here } diff --git a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/hr_testRes.java b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/HrTestRes.java similarity index 83% rename from axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/hr_testRes.java rename to axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/HrTestRes.java index 0f310d2..3ab0fa0 100644 --- a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/hr_testRes.java +++ b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/dto/HrTestRes.java @@ -5,21 +5,21 @@ import lombok.Data; /** * @package io.shinhanlife.axhub.biz.mcp.tool.dto - * @className hr_testRes + * @className HrTestRes * @description AX HUB 시스템 처리 클래스 - * @author root + * @author system * @create 2026.07.13 *
* ---------- 개정이력 ---------- * 수정일 수정자 수정내용 * ---------- -------- --------------------------- - * 2026.07.13 root 최초생성 + * 2026.07.13 system 최초생성 * **/ @Data @JsonInclude(JsonInclude.Include.NON_NULL) -public class hr_testRes { +public class HrTestRes { private String status; private String message; // TODO: Add response fields here diff --git a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/mapper/HrMciMapper.java b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/mapper/HrMciMapper.java new file mode 100644 index 0000000..1646411 --- /dev/null +++ b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/mapper/HrMciMapper.java @@ -0,0 +1,17 @@ +package io.shinhanlife.axhub.biz.mcp.tool.hr.mapper; + +import io.shinhanlife.axhub.biz.mcp.tool.dto.SmsSendReq; +import io.shinhanlife.axhub.biz.mcp.tool.sms.dto.SmsMciReqDto; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.factory.Mappers; + +@Mapper(componentModel = "spring") +public interface HrMciMapper { + + HrMciMapper INSTANCE = Mappers.getMapper(HrMciMapper.class); + + @Mapping(source = "phoneNumber", target = "phone") + @Mapping(source = "message", target = "content") + SmsMciReqDto toMciReq(SmsSendReq req); +} diff --git a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/HrTestService.java b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/HrTestService.java new file mode 100644 index 0000000..707df19 --- /dev/null +++ b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/HrTestService.java @@ -0,0 +1,42 @@ +package io.shinhanlife.axhub.biz.mcp.tool.service; + +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.HrTestReq; +import io.shinhanlife.axhub.biz.mcp.tool.dto.HrTestRes; +import org.springframework.stereotype.Service; + +/** + * @package io.shinhanlife.axhub.biz.mcp.tool.service + * @className HrTestService + * @description AX HUB 시스템 처리 클래스 + * @author system + * @create 2026.07.13 + *
+ * ---------- 개정이력 ---------- + * 수정일 수정자 수정내용 + * ---------- -------- --------------------------- + * 2026.07.13 system 최초생성 + * + *+ */ +@Service +@McpTool( + routingType = "HTTP", + categoryKey = "hr" +) +public class HrTestService extends AbstractMcpToolService { + + @McpFunction( + displayName = "HrTest 툴", + name = "hrtest", + description = "인사 테스트", + prompt = "인사 테스트 해줘.", + mappingId = "HR_TEST", + register = true, + requiresApproval = false + ) + public Object execute(HrTestReq req) { + return executeLegacy("HTTP", "HR_TEST", req); + } +} diff --git a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/hr_testService.java b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/hr_testService.java deleted file mode 100644 index 1633821..0000000 --- a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/service/hr_testService.java +++ /dev/null @@ -1,42 +0,0 @@ -package io.shinhanlife.axhub.biz.mcp.tool.service; - -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.hr_testReq; -import io.shinhanlife.axhub.biz.mcp.tool.dto.hr_testRes; -import org.springframework.stereotype.Service; - -/** - * @package io.shinhanlife.axhub.biz.mcp.tool.service - * @className hr_testService - * @description AX HUB 시스템 처리 클래스 - * @author root - * @create 2026.07.13 - *
- * ---------- 개정이력 ---------- - * 수정일 수정자 수정내용 - * ---------- -------- --------------------------- - * 2026.07.13 root 최초생성 - * - *- */ -@Service -@McpTool( - routingType = "MCI", - categoryKey = "common" -) -public class hr_testService extends AbstractMcpToolService { - - @McpFunction( - displayName = "hr_test 툴", - name = "hr_test", - description = "hr 조회 합니다.", - prompt = "hr 조회 합니다. 해줘.", - mappingId = "HR_001", - register = false, - requiresApproval = false - ) - public Object execute(hr_testReq req) { - return executeLegacy("MCI", "HR_001", req); - } -}