Cute Blinking Unicorn

백엔드/스프링부트

mysql 연동하기

민밥통 2023. 12. 22. 16:13

application.properties
에서 기존꺼 주석하고 밑에거 붙여넣기

spring.datasource.driver-class-name=cohttp://m.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/sbb?serverTimezone=UTC&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=guro
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.format_sql=true


build.gradle에서
    //MYSQL
implementation 'org.springframework.boot:spring-boot-starter'
runtimeOnly 'com.mysql:mysql-connector-j'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

붙여넣고

MYSQL에서
sbb 데이터베이스 만들기

create database sbb;

use sbb;

'백엔드 > 스프링부트' 카테고리의 다른 글

간단한 게시판에 날짜 추가하기  (0) 2023.12.27
jsp, 스프링부트 간단한 게시판 만들기  (0) 2023.12.27
스프링부트 배우기  (0) 2023.12.15
강합 결합과 약한 결합  (0) 2023.12.14
스프링부트 시작  (0) 2023.12.14