From 7115995b43b8902ef617c9396d70e22d010d8484 Mon Sep 17 00:00:00 2001 From: bingseok Date: Thu, 17 Oct 2024 14:55:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?practice(#4):=20Database=EC=99=80=20Spring?= =?UTF-8?q?=20=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EC=97=B0=EA=B2=B0?= =?UTF-8?q?=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 ++-- src/main/resources/application.properties | 1 - src/main/resources/application.yml | 6 ++++++ 3 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 src/main/resources/application.properties create mode 100644 src/main/resources/application.yml diff --git a/build.gradle b/build.gradle index b24990c..179c9ba 100644 --- a/build.gradle +++ b/build.gradle @@ -24,10 +24,10 @@ repositories { } dependencies { -// implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' -// runtimeOnly 'com.mysql:mysql-connector-j' + runtimeOnly 'com.mysql:mysql-connector-j' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 0c7c661..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=spring diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..0bfd671 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,6 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/umc7th + username: umc7th + password: umc7th \ No newline at end of file From c218aad01462aa8447099db63bc7b3f40389d101 Mon Sep 17 00:00:00 2001 From: bingseok Date: Fri, 18 Oct 2024 17:44:05 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(#4):=20DB=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0bfd671..1b905f6 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,5 +2,5 @@ spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/umc7th - username: umc7th - password: umc7th \ No newline at end of file + username: ${DB_USER} + password: ${DB_PASSWORD} \ No newline at end of file