Skip to content

Commit

Permalink
chore: 환경에 따른 yml 파일 분리 (#411)
Browse files Browse the repository at this point in the history
* chore: 환경 별로 yml 파일 분리

* chore: 불필요한 yml 설정 제거
  • Loading branch information
ChooSeoyeon authored Aug 22, 2024
1 parent ff3e72d commit f5f3652
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 26 deletions.
15 changes: 15 additions & 0 deletions backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -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}
15 changes: 15 additions & 0 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
@@ -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}
5 changes: 5 additions & 0 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -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]
3 changes: 0 additions & 3 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 12 additions & 23 deletions backend/src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit f5f3652

Please sign in to comment.