Skip to content

Commit

Permalink
Merge pull request #72 from 0702Yoon/main
Browse files Browse the repository at this point in the history
application.yml 파일 분리
  • Loading branch information
0702Yoon authored Aug 14, 2024
2 parents 031117a + 6968ebd commit 5d906eb
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 34 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ out/

### VS Code ###
.vscode/

### yml file ###
/src/main/resources/application.yml
20 changes: 20 additions & 0 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
spring:
datasource:
url: ${DB_URL}
driver-class-name: com.mysql.cj.jdbc.Driver
username: ${DB_USER_NAME}
password: ${DB_PASSWORD}
# 환경 변수를 사용하는 데이터베이스 설정 (주석 해제 필요시) # datasource:
# 태태 로컬 데이터베이스 설정
# datasource:
# url: jdbc:mysql://localhost:3306/bigbrother
# driver-class-name: com.mysql.cj.jdbc.Driver
# username: root
# password: 1234
jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
format_sql: true
show_sql: true
15 changes: 15 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
spring:
datasource:
url: ${DB_URL}
username: ${DB_USER_NAME}
password: ${DB_PASSWORD}
hikari:
max-lifetime: 177000 # 177초, hikari는 RDS wait_timeout(180초)보다 2 ~ 3초 정도 짧게 줄 것을 권장
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:
hibernate:
ddl-auto: create-drop
properties:
hibernate:
format_sql: true
show_sql: true
33 changes: 2 additions & 31 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ server:
port: 8080

spring:
profiles:
active: ${ACTIVE_NAME}
main:
debug: true

Expand All @@ -11,28 +13,6 @@ spring:
write-dates-as-timestamps: false
time-zone: Asia/Seoul

datasource:
url: ${DB_URL}
username: ${DB_USER_NAME}
password: ${DB_PASSWORD}
hikari:
max-lifetime: 177000 # 177초, hikari는 RDS wait_timeout(180초)보다 2 ~ 3초 정도 짧게 줄 것을 권장
driver-class-name: com.mysql.cj.jdbc.Driver
# 환경 변수를 사용하는 데이터베이스 설정 (주석 해제 필요시) # datasource:
# 태태 로컬 데이터베이스 설정
# datasource:
# url: jdbc:mysql://localhost:3306/bigbrother
# driver-class-name: com.mysql.cj.jdbc.Driver
# username: root
# password: 1234

# 상윤 로컬 데이터베이스 설정
# datasource:
# url: jdbc:mysql://localhost:3306/big_brother
# driver-class-name: com.mysql.cj.jdbc.Driver
# username: root
# password: 1234

mail:
host: smtp.gmail.com
port: 587
Expand All @@ -50,15 +30,6 @@ spring:
writetimeout: 5000

auth-code-expiration-millis: 1800000 # 30 * 60 * 1000 == 30분

jpa:
hibernate:
ddl-auto: create-drop
properties:
hibernate:
format_sql: true
show_sql: true

data:
redis:
port: 6379
Expand Down

0 comments on commit 5d906eb

Please sign in to comment.