Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
Fix 프로파일 분리
Browse files Browse the repository at this point in the history
CI 구성함에 있어 명시적으로 프로파일을 분리하여 변경 실수 방지
#28
  • Loading branch information
phantom08266 committed Jun 15, 2021
1 parent 7e6b91e commit cd4f363
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
6 changes: 6 additions & 0 deletions src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
spring.datasource.url=jdbc:mysql://localhost:3306/Careers?useUnicode=true@characterEncoding=utf8&serverTimezone=Asia/Seoul&allowMultiQueries=true
spring.datasource.username=dev
spring.datasource.password=1234

spring.redis.host=localhost
spring.redis.port=6379
6 changes: 6 additions & 0 deletions src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
spring.datasource.url=${MYSQL_DB_HOST}
spring.datasource.username=${MYSQL_DB_USERNAME}
spring.datasource.password=${MYSQL_DB_PASSWORD}

spring.redis.host=${REDIS_HOST}
spring.redis.port=${REDIS_PORT}
21 changes: 0 additions & 21 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
spring.profiles.active=dev


mybatis.type-aliases-package=com.dev.careers.model
mybatis.mapper-locations=mybatis/*.xml
logging.config=classpath:log4j2.xml

#---
spring.config.activate.on-profile=dev

spring.datasource.url=jdbc:mysql://localhost:3306/Careers?useUnicode=true@characterEncoding=utf8&serverTimezone=Asia/Seoul&allowMultiQueries=true
spring.datasource.username=dev
spring.datasource.password=1234

spring.redis.host=localhost
spring.redis.port=6379

#---
spring.config.activate.on-profile=prod

spring.datasource.url=jdbc:mysql://localhost:3306/Careers?useUnicode=true@characterEncoding=utf8&serverTimezone=Asia/Seoul&allowMultiQueries=true
spring.datasource.username=dev
spring.datasource.password=1234

spring.redis.host=localhost
spring.redis.port=6379

0 comments on commit cd4f363

Please sign in to comment.