From 71c8afef3361a07259eef0d64be00b87e536dd41 Mon Sep 17 00:00:00 2001 From: jade Date: Mon, 13 Jul 2026 09:37:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Developer=20Portal=20=EC=8A=A4=EC=BA=90?= =?UTF-8?q?=ED=8F=B4=EB=94=A9=20=EC=8B=9C=20=EB=B9=88=20=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=EC=97=B4=20=EC=9E=85=EB=A0=A5=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=EA=B0=92=20=EC=B2=98=EB=A6=AC=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/ScaffoldingController.java | 12 +++++--- axhub-tool-hr/Dockerfile | 4 +++ axhub-tool-hr/build.gradle | 10 +++++++ .../biz/mcp/tool/hr/HrToolApplication.java | 28 +++++++++++++++++ .../resources/application-local.properties | 30 +++++++++++++++++++ .../src/main/resources/application-local.yml | 12 ++++++++ .../src/main/resources/application.properties | 2 ++ .../src/main/resources/logback-spring.xml | 24 +++++++++++++++ docker-compose.yml | 21 +++++++++++++ settings.gradle | 3 +- 10 files changed, 141 insertions(+), 5 deletions(-) create mode 100644 axhub-tool-hr/Dockerfile create mode 100644 axhub-tool-hr/build.gradle create mode 100644 axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/HrToolApplication.java create mode 100644 axhub-tool-hr/src/main/resources/application-local.properties create mode 100644 axhub-tool-hr/src/main/resources/application-local.yml create mode 100644 axhub-tool-hr/src/main/resources/application.properties create mode 100644 axhub-tool-hr/src/main/resources/logback-spring.xml diff --git a/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/presentation/ScaffoldingController.java b/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/presentation/ScaffoldingController.java index 639699e..d781ea0 100644 --- a/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/presentation/ScaffoldingController.java +++ b/axhub-gateway/src/main/java/io/shinhanlife/axhub/biz/mcp/gateway/presentation/ScaffoldingController.java @@ -20,8 +20,10 @@ public class ScaffoldingController { if (!moduleName.startsWith("axhub-tool-")) moduleName = "axhub-tool-" + moduleName; String port = req.getOrDefault("port", "8085"); String shortName = moduleName.replace("axhub-tool-", "").replace("-", ""); - String author = req.getOrDefault("author", "System"); - String date = req.getOrDefault("date", java.time.LocalDate.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy.MM.dd"))); + String author = req.get("author"); + if (author == null || author.trim().isEmpty()) author = System.getProperty("user.name"); + String date = req.get("date"); + if (date == null || date.trim().isEmpty()) date = java.time.LocalDate.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy.MM.dd")); return PodScaffolder.scaffoldPod(moduleName, port, shortName, author, date); } catch (Exception e) { @@ -38,8 +40,10 @@ public class ScaffoldingController { String group = req.getOrDefault("group", "COMMON"); String routingType = req.getOrDefault("routingType", "HTTP"); String moduleName = req.getOrDefault("moduleName", "axhub-tool-other"); - String author = req.getOrDefault("author", "System"); - String date = req.getOrDefault("date", java.time.LocalDate.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy.MM.dd"))); + String author = req.get("author"); + if (author == null || author.trim().isEmpty()) author = System.getProperty("user.name"); + String date = req.get("date"); + if (date == null || date.trim().isEmpty()) date = java.time.LocalDate.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy.MM.dd")); boolean register = Boolean.parseBoolean(req.getOrDefault("register", "true")); return ToolScaffolder.scaffold(baseName, interfaceId, description, group, routingType, moduleName, author, date, register); diff --git a/axhub-tool-hr/Dockerfile b/axhub-tool-hr/Dockerfile new file mode 100644 index 0000000..3343e67 --- /dev/null +++ b/axhub-tool-hr/Dockerfile @@ -0,0 +1,4 @@ +FROM eclipse-temurin:21-jdk-alpine +WORKDIR /app +COPY build/libs/axhub-tool-hr-0.0.1-SNAPSHOT.jar app.jar +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/axhub-tool-hr/build.gradle b/axhub-tool-hr/build.gradle new file mode 100644 index 0000000..997adcb --- /dev/null +++ b/axhub-tool-hr/build.gradle @@ -0,0 +1,10 @@ +plugins { + id 'org.springframework.boot' +} +dependencies { + implementation project(':axhub-tool-core') +} +dependencies { + compileOnly 'org.projectlombok:lombok:1.18.32' + annotationProcessor 'org.projectlombok:lombok:1.18.32' +} diff --git a/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/HrToolApplication.java b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/HrToolApplication.java new file mode 100644 index 0000000..11da8ae --- /dev/null +++ b/axhub-tool-hr/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/hr/HrToolApplication.java @@ -0,0 +1,28 @@ +package io.shinhanlife.axhub.biz.mcp.tool.hr; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cache.annotation.EnableCaching; + +/** + * @package io.shinhanlife.axhub.biz.mcp.tool.hr + * @className HrToolApplication + * @description AX HUB 시스템 처리 클래스 + * @author + * @create + *
+ * ---------- 개정이력 ----------
+ * 수정일      수정자    수정내용
+ * ---------- -------- ---------------------------
+ *       최초생성
+ *
+ * 
+ */ +@SpringBootApplication(scanBasePackages = {"io.shinhanlife.axhub.biz.mcp.tool", "io.shinhanlife.axhub.biz.mcp.adapter", "io.shinhanlife.axhub.common.mcp", "io.shinhanlife.axhub.common.config"}) +@org.springframework.boot.context.properties.ConfigurationPropertiesScan(basePackages = {"io.shinhanlife.axhub.biz.mcp.tool", "io.shinhanlife.axhub.biz.mcp.adapter", "io.shinhanlife.axhub.common.mcp", "io.shinhanlife.axhub.common.config"}) +@EnableCaching +public class HrToolApplication { + public static void main(String[] args) { + SpringApplication.run(HrToolApplication.class, args); + } +} diff --git a/axhub-tool-hr/src/main/resources/application-local.properties b/axhub-tool-hr/src/main/resources/application-local.properties new file mode 100644 index 0000000..16a2930 --- /dev/null +++ b/axhub-tool-hr/src/main/resources/application-local.properties @@ -0,0 +1,30 @@ +# 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 + +# API 보안 키 설정 + mcp.security.tenant-domains.mcp-client-1=CUSTOMER,COMMON +mcp.security.tenant-domains.mcp-client-2=ALL + +# 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 diff --git a/axhub-tool-hr/src/main/resources/application-local.yml b/axhub-tool-hr/src/main/resources/application-local.yml new file mode 100644 index 0000000..2c12d7c --- /dev/null +++ b/axhub-tool-hr/src/main/resources/application-local.yml @@ -0,0 +1,12 @@ +spring: + application: + name: axhub-tool-hr + config: + import: "classpath:config/application-glow-local.yml" + +server: + port: 8086 + +axhub: + tool: + url: "http://tool-hr:8086" diff --git a/axhub-tool-hr/src/main/resources/application.properties b/axhub-tool-hr/src/main/resources/application.properties new file mode 100644 index 0000000..1a4d891 --- /dev/null +++ b/axhub-tool-hr/src/main/resources/application.properties @@ -0,0 +1,2 @@ +spring.profiles.active=local +mcp.namespace=hr diff --git a/axhub-tool-hr/src/main/resources/logback-spring.xml b/axhub-tool-hr/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..43481e9 --- /dev/null +++ b/axhub-tool-hr/src/main/resources/logback-spring.xml @@ -0,0 +1,24 @@ + + + + + + ${LOG_PATTERN} + + + + logs/axhub-tool-hr.log + + logs/axhub-tool-hr-%d{yyyy-MM-dd}.log + 30 + + + ${LOG_PATTERN} + + + + + + + + diff --git a/docker-compose.yml b/docker-compose.yml index cc7eb01..272d172 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -109,3 +109,24 @@ services: - GLOW_COMMUNICATION_EXTMCI_PORT=8081 - GLOW_COMMUNICATION_EAI_HOST=tcp://gateway - GLOW_COMMUNICATION_EAI_PORT=8081 + + tool-hr: + build: + context: ./axhub-tool-hr + ports: + - "8086:8086" + depends_on: + - redis + environment: + - TZ=Asia/Seoul + - SPRING_REDIS_HOST=redis + - SPRING_REDIS_PORT=6379 + - SPRING_DATA_REDIS_PORT=6379 + - AXHUB_GATEWAY_URL=http://gateway:8081 + - AXHUB_TOOL_URL=http://tool-hr:8086 + - GLOW_COMMUNICATION_MCI_HOST=http://gateway + - GLOW_COMMUNICATION_MCI_PORT=8081 + - GLOW_COMMUNICATION_EXTMCI_HOST=http://gateway + - GLOW_COMMUNICATION_EXTMCI_PORT=8081 + - GLOW_COMMUNICATION_EAI_HOST=tcp://gateway + - GLOW_COMMUNICATION_EAI_PORT=8081 diff --git a/settings.gradle b/settings.gradle index c7922b5..57cc092 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,4 +6,5 @@ include 'axhub-tool-core' include 'axhub-tool-sms' include 'axhub-tool-email' include 'axhub-tool-other' -include 'axhub-tool-payment' \ No newline at end of file +include 'axhub-tool-payment' +include 'axhub-tool-hr'