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