From 1094ed480e3d993ccca079fdbf7c5903c5844fcf Mon Sep 17 00:00:00 2001 From: "chosw1002@naver.com" Date: Tue, 10 Oct 2023 13:26:32 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20postgresql=20=EC=97=B0=EA=B2=B0=20(#93?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 5 ++++- src/main/resources/application.properties | 10 ++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 5fbd6024..270fca6a 100644 --- a/build.gradle +++ b/build.gradle @@ -35,11 +35,14 @@ dependencies { // aws implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE' + // postgresql + implementation 'org.postgresql:postgresql:42.6.0' + runtimeOnly 'org.postgresql:postgresql' + //redis implementation 'org.springframework.boot:spring-boot-starter-data-redis' compileOnly 'org.projectlombok:lombok' - runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index bad28544..7cd40c4c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,12 +1,10 @@ -# h2 database -spring.datasource.driver-class-name=org.h2.Driver -spring.datasource.url=jdbc:h2:mem:testdb -spring.datasource.username=sa -spring.h2.console.enabled=true # jpa -spring.jpa.defer-datasource-initialization=true +spring.jpa.database=postgresql spring.jpa.properties.hibernate.format_sql=true +spring.jpa.show-sql=true spring.jpa.properties.hibernate.use_sql_comments=true +spring.jpa.hibernate.ddl-auto=update +spring.jpa.defer-datasource-initialization=true #security spring.profiles.include=security