From 313a3192b7c176ed06290d5f327e4fe1fae1b854 Mon Sep 17 00:00:00 2001 From: Lee Min Woo Date: Sat, 7 Jan 2023 05:03:11 +0900 Subject: [PATCH] =?UTF-8?q?#63=20-=20DB=20=EB=A7=88=EC=9D=B4=EA=B7=B8?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=85=98:=20MySQL=20->=20PostgreSQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 드라이버는 url로 자동 선택되므로 지우는 것이 더 효율적이다. --- build.gradle | 1 + src/main/resources/application.yaml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1bcaef8..d983e68 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,7 @@ dependencies { implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' runtimeOnly 'com.h2database:h2' runtimeOnly 'mysql:mysql-connector-java' + runtimeOnly 'org.postgresql:postgresql' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.projectlombok:lombok' diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 0a3f10f..67b065f 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -9,10 +9,9 @@ logging: spring: datasource: - url: jdbc:mysql://localhost:3306/board + url: jdbc:postgresql://localhost:5432/board username: lmw password: 74147414l - driver-class-name: com.mysql.cj.jdbc.Driver # url: jdbc:h2:mem:testdb # username: sa # driver-class-name: org.h2.Driver