From 06781f07b584beb9b03c3bdd4e674527e4d4b070 Mon Sep 17 00:00:00 2001 From: Ju Minji Date: Mon, 9 Oct 2023 03:33:41 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20yml=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=9E=AC=EA=B5=AC=EC=84=B1=20(#26)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 4Week_Mission/build.gradle | 2 +- .../src/main/resources/application-dev.yml | 6 +++--- .../src/main/resources/application-prod.yml | 11 +++++++++++ .../src/main/resources/application-test.yml | 6 +++--- 4Week_Mission/src/main/resources/application.yml | 15 ++++++++++----- 5 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 4Week_Mission/src/main/resources/application-prod.yml diff --git a/4Week_Mission/build.gradle b/4Week_Mission/build.gradle index 0e7a756..663c8a5 100644 --- a/4Week_Mission/build.gradle +++ b/4Week_Mission/build.gradle @@ -31,7 +31,7 @@ dependencies { implementation 'org.mapstruct:mapstruct:1.5.3.Final' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' - runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' + implementation 'mysql:mysql-connector-java' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5' annotationProcessor 'org.projectlombok:lombok' diff --git a/4Week_Mission/src/main/resources/application-dev.yml b/4Week_Mission/src/main/resources/application-dev.yml index 8171a57..ba22bb7 100644 --- a/4Week_Mission/src/main/resources/application-dev.yml +++ b/4Week_Mission/src/main/resources/application-dev.yml @@ -10,9 +10,9 @@ spring: restart: enabled: true datasource: - url: jdbc:mariadb://127.0.0.1:3306/ebook_market__dev?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul - username: user1 - password: Ttest12341234@ + url: jdbc:mysql://127.0.0.1:3306/ebook_market__dev?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul + username: ${DEV_DB_USERNAME} + password: ${DEV_DB_PASSWORD} jpa: hibernate: ddl-auto: create \ No newline at end of file diff --git a/4Week_Mission/src/main/resources/application-prod.yml b/4Week_Mission/src/main/resources/application-prod.yml new file mode 100644 index 0000000..b887549 --- /dev/null +++ b/4Week_Mission/src/main/resources/application-prod.yml @@ -0,0 +1,11 @@ +spring: + datasource: + url: jdbc:mysql://${DB_HOST}:3306/ebook_market__prod?useUnicode=true&characterEncoding=utf8&serverTimeZone=Asia/Seoul&allowPublicKeyRetrieval=true&useSSL=false + username: ${DB_USERNAME} + password: ${DB_PASSWORD} + jpa: + hibernate: + ddl-auto: none +logging: + level: + root: info diff --git a/4Week_Mission/src/main/resources/application-test.yml b/4Week_Mission/src/main/resources/application-test.yml index e05f604..59cd5d9 100644 --- a/4Week_Mission/src/main/resources/application-test.yml +++ b/4Week_Mission/src/main/resources/application-test.yml @@ -1,8 +1,8 @@ spring: datasource: - url: jdbc:mariadb://${testDbIp:127.0.0.1}:3306/ebook_market__test?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul - username: ${testDbId:user1} - password: ${testDbPw:Ttest12341234@} + url: jdbc:mysql://${TEST_DB_HOST:127.0.0.1}:3306/ebook_market__test?useUnicode=true&characterEncoding=utf8&autoReconnect=true&serverTimezone=Asia/Seoul + username: ${TEST_DB_USERNAME} + password: ${TEST_DB_PASSWORD} jpa: hibernate: ddl-auto: create \ No newline at end of file diff --git a/4Week_Mission/src/main/resources/application.yml b/4Week_Mission/src/main/resources/application.yml index 4d1a8b9..4643a8e 100644 --- a/4Week_Mission/src/main/resources/application.yml +++ b/4Week_Mission/src/main/resources/application.yml @@ -5,12 +5,12 @@ spring: - base-addi batch: job: - names: ${job.name:none} + names: ${JOB_NAME:none} month: jdbc: initialize-schema: ALWAYS datasource: - driver-class-name: org.mariadb.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver jpa: properties: hibernate: @@ -20,13 +20,18 @@ spring: mail: host: smtp.gmail.com port: 587 - username: - password: + username: ${MAIL_USERNAME} + password: ${MAIL_PASSWORD} properties: mail.smtp.auth: true mail.smtp.ssl.enable: true mail.smtp.ssl.trust: smtp.gmail.com mail.smtp.starttls.enable: true + custom: + toss-payments: + secret-key: ${TOSS_SECRET_KEY} + jwt: + secret-key: ${JWT_SECRET_KEY} logging: level: root: info @@ -39,4 +44,4 @@ custom: wholesalePriceRate: 0.5 site: name: MEOTBOOKS - baseUrl: "http://localhost:8010" \ No newline at end of file + baseUrl: "http://localhost:8010"