Split application properties by environment (local, dev, prod)

This commit is contained in:
jade
2026-07-03 23:15:20 +09:00
parent 6b64c3c8cb
commit 9dc18baa72
4 changed files with 21 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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