Written on
·
242
2
오라클 대신에 mysql 써야 하는데 자꾸 에러 나고 안돼요.
디펜던시에 아래같이 넣어 줬어요.
implementation "mysql:mysql-connector-java:5.1.46"
implementation "org.springframework.boot:spring-boot-starter-jdbc:2.0.1.RELEASE"
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl'
Answer 1
1
build.gradle 의 jdbc 세팅
-------------------------
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("mysql:mysql-connector-java")
application.properties 에서 데이터베이스 접속 내용
--------------------------------------------------
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/데이터베이스명
spring.datasource.username=유저
spring.datasource.password=패스워드
이렇게 설정해 주시면 됩니다.