From 9dc18baa72be6c247499172760d614459a3c0758 Mon Sep 17 00:00:00 2001 From: jade Date: Fri, 3 Jul 2026 23:15:20 +0900 Subject: [PATCH] Split application properties by environment (local, dev, prod) --- src/main/resources/application-dev.properties | 5 +++++ src/main/resources/application-local.properties | 7 +++++++ src/main/resources/application-prod.properties | 5 +++++ src/main/resources/application.properties | 13 ++++--------- 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 src/main/resources/application-dev.properties create mode 100644 src/main/resources/application-local.properties create mode 100644 src/main/resources/application-prod.properties diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..161821b --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,5 @@ +# Dev 환경 전용 설정 (개발 서버 DB 연결 정보 등) +# spring.datasource.url=jdbc:oracle:thin:@//dev-db-host:1521/XEPDB1 +# spring.datasource.driverClassName=oracle.jdbc.OracleDriver +# spring.datasource.username=dev_user +# spring.datasource.password=dev_password diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties new file mode 100644 index 0000000..04991c6 --- /dev/null +++ b/src/main/resources/application-local.properties @@ -0,0 +1,7 @@ +# Local 환경 전용 설정 (H2 메모리 DB 등) +spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1; +spring.datasource.driverClassName=org.h2.Driver +spring.datasource.username=sa +spring.datasource.password=password + +spring.h2.console.enabled=true diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..fb4a354 --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,5 @@ +# Prod 환경 전용 설정 (운영 서버 DB 연결 정보 등) +# spring.datasource.url=jdbc:oracle:thin:@//prod-db-host:1521/PROD +# spring.datasource.driverClassName=oracle.jdbc.OracleDriver +# spring.datasource.username=prod_user +# spring.datasource.password=prod_password diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index ada18ee..e1ef928 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,18 +1,13 @@ spring.application.name=axhub-admin - -# application.properties (?? ??, Redis ? ??) server.port=8080 -spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1; -spring.datasource.driverClassName=org.h2.Driver -spring.datasource.username=sa -spring.datasource.password=password -spring.h2.console.enabled=true +# 기본적으로 local 환경을 실행 +spring.profiles.active=local +# MyBatis 공통 설정 mybatis.mapper-locations=classpath:mapper/**/*.xml mybatis.type-aliases-package= +mybatis.configuration.map-underscore-to-camel-case=true spring.sql.init.mode=always -mybatis.configuration.map-underscore-to-camel-case=true - logging.level.com.corundumstudio.socketio=DEBUG \ No newline at end of file