From f5f365236f69fb8229b8cabe9c8276180a698f2c Mon Sep 17 00:00:00 2001 From: Dora Choo Date: Thu, 22 Aug 2024 11:18:08 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=ED=99=98=EA=B2=BD=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20yml=20=ED=8C=8C=EC=9D=BC=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC=20=20(#411)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 환경 별로 yml 파일 분리 * chore: 불필요한 yml 설정 제거 --- .../src/main/resources/application-dev.yml | 15 ++++++++ .../src/main/resources/application-prod.yml | 15 ++++++++ .../src/main/resources/application.properties | 5 +++ backend/src/main/resources/application.yml | 3 -- backend/src/main/resources/data.sql | 35 +++++++------------ 5 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 backend/src/main/resources/application-dev.yml create mode 100644 backend/src/main/resources/application-prod.yml create mode 100644 backend/src/main/resources/application.properties diff --git a/backend/src/main/resources/application-dev.yml b/backend/src/main/resources/application-dev.yml new file mode 100644 index 000000000..680ef3eb5 --- /dev/null +++ b/backend/src/main/resources/application-dev.yml @@ -0,0 +1,15 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: ${SPRING_DATASOURCE_URL} + username: ${SPRING_DATASOURCE_USERNAME} + password: ${SPRING_DATASOURCE_PASSWORD} + jpa: + hibernate: + ddl-auto: validate + +security: + jwt: + token: + access-secret-key: ${JWT_ACCESS_SECRET_KEY} + refresh-secret-key: ${JWT_REFRESH_SECRET_KEY} diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml new file mode 100644 index 000000000..680ef3eb5 --- /dev/null +++ b/backend/src/main/resources/application-prod.yml @@ -0,0 +1,15 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: ${SPRING_DATASOURCE_URL} + username: ${SPRING_DATASOURCE_USERNAME} + password: ${SPRING_DATASOURCE_PASSWORD} + jpa: + hibernate: + ddl-auto: validate + +security: + jwt: + token: + access-secret-key: ${JWT_ACCESS_SECRET_KEY} + refresh-secret-key: ${JWT_REFRESH_SECRET_KEY} diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties new file mode 100644 index 000000000..b9bcb8f3b --- /dev/null +++ b/backend/src/main/resources/application.properties @@ -0,0 +1,5 @@ +SPRING_DATASOURCE_URL=[SPRING_DATASOURCE_URL] +SPRING_DATASOURCE_USERNAME=[SPRING_DATASOURCE_USERNAME] +SPRING_DATASOURCE_PASSWORD=[SPRING_DATASOURCE_PASSWORD] +JWT_ACCESS_SECRET_KEY=[JWT_ACCESS_SECRET_KEY] +JWT_REFRESH_SECRET_KEY=[JWT_REFRESH_SECRET_KEY] diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 4d7587379..fff0c18ed 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -3,9 +3,6 @@ spring: name: chongdae datasource: url: jdbc:h2:mem:database - # h2: - # console: - # enabled: true jpa: show-sql: true defer-datasource-initialization: true diff --git a/backend/src/main/resources/data.sql b/backend/src/main/resources/data.sql index c9e7483b3..8575bbf43 100644 --- a/backend/src/main/resources/data.sql +++ b/backend/src/main/resources/data.sql @@ -1,26 +1,15 @@ -INSERT INTO MEMBER (NICKNAME, CREATED_AT, UPDATED_AT, PASSWORD, LOGIN_ID, PROVIDER) -VALUES ('dora', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'PtgtJCnn307FyCBvRprsy+42rX7dg00qVLWkPbl2Ag0=', 'dora', - 'KAKAO'), - ('poke', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'XimRQY0Y2avPH6KxGK4ZOXB4+MT3Sfb605ZEPidVNpQ=', 'poke', - 'KAKAO'), - ('mason', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'WBmuFn7FSb5jG03SKBB0K7MNk0mNg9FLPoHyTbi4Tl0=', 'mason', - 'KAKAO'), - ('ever', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'UhN2JlsRhvNn7XY2WYlfDwI9/d/XoRvr8Ls7tbeYZWg=', 'ever', - 'KAKAO'), - ('alsong', '2024-07-15 00:00:00', '2024-07-15 00:00:00', '+qY3Pnqyjj9amVGZ1Bu63iJX6cpon7kQiIvqAG0ExkE=', - 'alsong', 'KAKAO'), - ('seogi', '2024-07-15 00:00:00', '2024-07-15 00:00:00', '0CWUdyVQ1TP+GGlI9W2d5Gao/5HgT0MSeIwald0Qcsw=', 'seogi', - 'KAKAO'), - ('chaechae', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'WCkwnMjy/yW6odwkADguEIcHjFVELq+JLy+WeojvJ88=', - 'chaechae', 'KAKAO'), - ('tommy', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'FDCoOHIo4OPB8wBuYLLf1b3ZRTBSzNll45s8nmyQjdQ=', 'tommy', - 'KAKAO'), - ('james', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'Z2XFMZIARj17tEES+PIavOqFkT4xl5eIKPvQdtHTb00=', 'james', - 'KAKAO'), - ('jason', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'VQaSJjY9GBmpLaCga6sCpKYFBEC3G8VNva5seJzDwvg=', 'jason', - 'KAKAO'), - ('lisa', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'MaG6sq0cGDEXwmZ++LWXXtIcJ6QqQgTwyIll8xExJdk=', 'lisa', - 'KAKAO'); +INSERT INTO MEMBER (NICKNAME, CREATED_AT, UPDATED_AT, PASSWORD) +VALUES ('dora', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'PtgtJCnn307FyCBvRprsy+42rX7dg00qVLWkPbl2Ag0='), + ('poke', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'XimRQY0Y2avPH6KxGK4ZOXB4+MT3Sfb605ZEPidVNpQ='), + ('mason', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'WBmuFn7FSb5jG03SKBB0K7MNk0mNg9FLPoHyTbi4Tl0='), + ('ever', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'UhN2JlsRhvNn7XY2WYlfDwI9/d/XoRvr8Ls7tbeYZWg='), + ('alsong', '2024-07-15 00:00:00', '2024-07-15 00:00:00', '+qY3Pnqyjj9amVGZ1Bu63iJX6cpon7kQiIvqAG0ExkE='), + ('seogi', '2024-07-15 00:00:00', '2024-07-15 00:00:00', '0CWUdyVQ1TP+GGlI9W2d5Gao/5HgT0MSeIwald0Qcsw='), + ('chaechae', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'WCkwnMjy/yW6odwkADguEIcHjFVELq+JLy+WeojvJ88='), + ('tommy', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'FDCoOHIo4OPB8wBuYLLf1b3ZRTBSzNll45s8nmyQjdQ='), + ('james', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'Z2XFMZIARj17tEES+PIavOqFkT4xl5eIKPvQdtHTb00='), + ('jason', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'VQaSJjY9GBmpLaCga6sCpKYFBEC3G8VNva5seJzDwvg='), + ('lisa', '2024-07-15 00:00:00', '2024-07-15 00:00:00', 'MaG6sq0cGDEXwmZ++LWXXtIcJ6QqQgTwyIll8xExJdk='); INSERT INTO OFFERING (TOTAL_COUNT, CURRENT_COUNT, TOTAL_PRICE, ORIGIN_PRICE, DISCOUNT_RATE, CREATED_AT, UPDATED_AT, MEMBER_ID, MEETING_DATE, DESCRIPTION, MEETING_ADDRESS, MEETING_ADDRESS_DONG,