| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 제로베이스
- LinkedList
- restTemplate
- 백엔드스쿨
- JPA
- ORM
- 컴퓨터 공학
- 서버
- 개발자
- queue
- error
- 백엔드공부
- actuator
- QueryDSL
- 컴퓨터 구조
- 스프링부트
- spring
- Java
- 핵심가이드
- 자료구조
- TestCode
- 프로그래머스
- 백엔드
- SpringSecurity
- 연관관계
- array
- SpringBoot
- spring boot
- 백준
- JWT
Archives
- Today
- Total
be_better
[Springboot] Mysql 연동 - com.mysql.cj.jdbc.Driver 빨간줄 본문
Springboot/Error 해결
[Springboot] Mysql 연동 - com.mysql.cj.jdbc.Driver 빨간줄
NiceTry 2023. 11. 20. 20:31목차
에러 내용
Springboot와 Mysql 연동을 위해
gradle에 mysql dependency를 추가하고
dependencies {
runtimeOnly 'mysql:mysql-connector-java'
}
application.yml 에 datasource를 작성했는데 빨간줄로 되어있는 경우가 있다.

원인은
build.gradle에서 관련 드라이버를 가져오지 못했기 때문이다.
해결
Build도 오류없이 잘 되었어도 이런 경우가 있는데 이럴 땐 mysql 버전을 확인해서 명시해주면 된다..!
runtimeOnly 'mysql:mysql-connector-java:8.0.25'
빨간줄이 없어진것을 확인할 수 있다.