-
Reason: Failed to determine a suitable driver class취준/Project 2024. 5. 1. 14:43
Spring Boot와 RDS를 연결하려고 하는데 자꾸 Reason: Failed to determine a suitable driver class와 같은 오류가 떴다 해결방안은 여러 가지 나와 있었는데 내가 해결한 방법을 정리하고자 한다.
1. properties 파일을 사용한다.
설정 파일을 yaml 파일을 이용하여 설정을 했지만 어떠한 이유인지는 모르겠지만 driver class를 찾을 수 없다고 떠서 properties로
설정파일을 작성하였다.
yaml 파일에서 driver-class-name 설정을 명시해줘야 하는데 해당 과정에서 문제가 발생해서인지 프로젝트가 돌아가지 않았다.
2. gradle 파일 세팅
implementation mysql을 빼버렸다. runtimeOnly를 해도 어차피 mysql connector라이브러리를 다운로드하여서 중복되는 거 같아 빼버렸다.
'취준 > Project' 카테고리의 다른 글
Naver MAP API를 이용해 지도 구현 (1) 2024.06.16 EC2에 Redis 설치후 연동하기 (0) 2024.06.08 Spring Boot, Redis를 이용하여 RefreshToken 발급하기 (0) 2024.05.31 Spring Boot LazyInitializationException (0) 2024.05.29 Spring Boot 개발 환경 분리하기(properties File) (1) 2024.05.23