diff --git a/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/PodScaffolder.java b/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/PodScaffolder.java index e716c31..d2dba1c 100644 --- a/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/PodScaffolder.java +++ b/axhub-tool-core/src/main/java/io/shinhanlife/axhub/biz/mcp/tool/util/PodScaffolder.java @@ -105,6 +105,47 @@ public class PodScaffolder { """.formatted(moduleName, portStr, moduleName.replace("axhub-backend-main-", "").replace("axhub-", ""), portStr); Files.writeString(resPath.resolve("application-local.yml"), applicationYml); + String applicationProperties = """ + spring.profiles.active=local + """; + Files.writeString(resPath.resolve("application.properties"), applicationProperties); + + String applicationLocalProperties = """ + # 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.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 + mcp.security.api-keys.SHINHAN_MCP_TEST_KEY_9999=mcp-client-2 + 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 + """; + Files.writeString(resPath.resolve("application-local.properties"), applicationLocalProperties); + System.out.println("[5/6] settings.gradle 에 모듈 등록 중..."); Path settingsPath = Paths.get("settings.gradle"); if (Files.exists(settingsPath)) { diff --git a/axhub-tool-payment/src/main/resources/application-local.properties b/axhub-tool-payment/src/main/resources/application-local.properties new file mode 100644 index 0000000..54d056d --- /dev/null +++ b/axhub-tool-payment/src/main/resources/application-local.properties @@ -0,0 +1,32 @@ +# 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.api-keys.SHINHAN_MCP_SECRET_KEY_2026=mcp-client-1 +mcp.security.api-keys.SHINHAN_MCP_TEST_KEY_9999=mcp-client-2 +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-payment/src/main/resources/application.properties b/axhub-tool-payment/src/main/resources/application.properties new file mode 100644 index 0000000..0430deb --- /dev/null +++ b/axhub-tool-payment/src/main/resources/application.properties @@ -0,0 +1,10 @@ +server.port=8084 +spring.application.name=axhub-tool-other + +spring.profiles.active=local + +# Suppress Kafka Connection Logs +logging.level.org.apache.kafka=ERROR + +# Auto Prefix Namespace +mcp.namespace=other diff --git a/axhub-tool-payment/src/main/resources/logback-spring.xml b/axhub-tool-payment/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..adb8bca --- /dev/null +++ b/axhub-tool-payment/src/main/resources/logback-spring.xml @@ -0,0 +1,36 @@ + + + + + + + + + + ${LOG_PATTERN} + + + + + + logs/axhub-tool-other.log + + + logs/axhub-tool-other-%d{yyyy-MM-dd}.log + + 30 + + + ${LOG_PATTERN} + + + + + + + + + + + +