From 288d313cf02c9542025aa8fb3209656144a2f2b0 Mon Sep 17 00:00:00 2001 From: DOEKYONG Date: Tue, 18 Apr 2023 18:17:04 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20H2=20->=20Mysql=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 5 +++- src/main/resources/application.properties | 34 +++++++++++++++-------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index fe5d5b9d7..3465a3f95 100644 --- a/build.gradle +++ b/build.gradle @@ -19,8 +19,11 @@ dependencies { implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc' implementation group: 'com.h2database', name: 'h2', version: '2.0.206' implementation 'org.springframework.boot:spring-boot-starter-validation' + implementation 'mysql:mysql-connector-java:8.0.32' +// implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + } tasks.named('test') { useJUnitPlatform() -} +} \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 106b1240a..46ac21bdb 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,16 +2,28 @@ server.servlet.encoding.force-response=true spring.mustache.suffix=.html spring.mustache.servlet.cache=false spring.mvc.hiddenmethod.filter.enabled=true - -spring.datasource.driverClassName=org.h2.Driver -#spring.datasource.url=jdbc:h2:~/spring-qna-db; -#spring.datasource.url=jdbc:h2:mem:test ???? ?? -spring.datasource.url=jdbc:h2:~/be-java-cafe/spring-qna-db -spring.datasource.username=sa -spring.datasource.password= - -spring.h2.console.enabled=true -spring.h2.console.path=/h2-console -spring.h2.console.settings.web-allow-others=true +server.port= 8080 +#spring.datasource.driverClassName=org.h2.Driver +##spring.datasource.url=jdbc:h2:~/spring-qna-db; +##spring.datasource.url=jdbc:h2:mem:test ???? ?? +#spring.datasource.url=jdbc:h2:~/be-java-cafe/spring-qna-db +#spring.datasource.username=sa +#spring.datasource.password= +# +#spring.h2.console.enabled=true +#spring.h2.console.path=/h2-console +#spring.h2.console.settings.web-allow-others=true spring.mustache.servlet.expose-session-attributes=true server.servlet.session.tracking-modes=cookie + +# MySQL ?? +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +# DB Source URL +spring.datasource.url=jdbc:mysql://localhost:3306/BOARD?serverTimezone=UTC&characterEncoding=UTF-8 + +# DB username +spring.datasource.username= root + +# DB password +spring.datasource.password= 1234