Skip to content

Commit

Permalink
MARA-33 : 스프링 설정 파일 분리 및 application.yml add .gitignore (#10)
Browse files Browse the repository at this point in the history
* application local, dev 설정 분리

* -Dspring.profiles.active local -> dev 변경

* application-local.yml 파일 .gitignore 등록
  • Loading branch information
jhkang1517 authored Jan 25, 2024
1 parent cd8741d commit e1f2c56
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
src/main/resources/application-local.yml

### STS ###
.apt_generated
Expand Down
2 changes: 1 addition & 1 deletion scripts/gh_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fi

DEPLOY_JAR=$DEPLOY_PATH$JAR_NAME
echo "> DEPLOY_JAR 배포" >> $DEPLOY_LOG_PATH
nohup java -jar -Dspring.profiles.active=local $DEPLOY_JAR --server.port=8081 >> $APPLICATION_LOG_PATH 2> $DEPLOY_ERR_LOG_PATH &
nohup java -jar -Dspring.profiles.active=dev $DEPLOY_JAR --server.port=8081 >> $APPLICATION_LOG_PATH 2> $DEPLOY_ERR_LOG_PATH &

sleep 3

Expand Down
26 changes: 25 additions & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,28 @@ spring:
url: ${url}
username: ${username}
password: ${password}
driver-class-name: org.mariadb.jdbc.Driver
driver-class-name: org.mariadb.jdbc.Driver

oauth:
kakao:
client-id: ${kakao-client-id}
client-secret: ${kakao-client-secret}
app-admin-key: ${kakao-app-admin-key}
url:
auth: https://kauth.kakao.com
api: https://kapi.kakao.com
google:
client-id: ${google-client-id}
client-secret: ${google-client-secret}
url:
auth: https://oauth2.googleapis.com
api: https://www.googleapis.com

jwt:
secret-key: ${jwt-secret-key}
access-duration-mils: 2147483647

logging:
level:
root: info
mara.server: TRACE
9 changes: 0 additions & 9 deletions src/main/resources/application-local.yml

This file was deleted.

26 changes: 0 additions & 26 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
spring:
profiles:
active: local
mvc:
path match:
matching-strategy: ant_path_matcher
Expand All @@ -12,27 +10,3 @@ spring:
hibernate:
format_sql: true
show_sql: true

oauth:
kakao:
client-id: ${kakao-client-id}
client-secret: ${kakao-client-secret}
app-admin-key: ${kakao-app-admin-key}
url:
auth: https://kauth.kakao.com
api: https://kapi.kakao.com
google:
client-id: ${google-client-id}
client-secret: ${google-client-secret}
url:
auth: https://oauth2.googleapis.com
api: https://www.googleapis.com

jwt:
secret-key: ${jwt-secret-key}
access-duration-mils: 2147483647

logging:
level:
root: info
mara.server: TRACE

0 comments on commit e1f2c56

Please sign in to comment.