반응형
failed to determine a suitable driver class
if you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
계속 이런 에러가 났었다
40분의 구글링 끝에 찾아낸 이유는 build.gradle 파일에 driver connector 설정을 해줘야하는데 설정을 안한 것이였다
Maven 은 pom.xml에서 설정을 해줘야한다
build.gradle 파일에 dependencies { } 안에 밑의 2줄을 추가하면 설정이 된다
implementation 'mysql:mysql-connector-java'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
dataSource의 설정은 application.properties 파일에 넣어주면 된다
spring.datasource.url=jdbc:mysql://[host 주소]:[포트번호]/[Database 이름]?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
spring.datasource.username=[계정 아이디]
spring.datasource.password=[계정 비밀번호]
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
감사합니다.. 덕분에 해결했습니다💖💖
반응형
'에러정리' 카테고리의 다른 글
IntelliJ 콘솔창 인코딩 한글 깨짐 문제 해결 (0) | 2023.01.30 |
---|---|
타입스크립트 설치 오류 (0) | 2022.11.13 |
[IntelliJ] 열린 파일의 위치, 경로가 Project창에서 보이는 설정 (0) | 2022.10.08 |
Cannot run program "svn" (): CreateProcess error=2, 지정된 파일을 찾을 수 없습니다 (0) | 2022.10.08 |
[IntelliJ + Mac] Request header is too large (0) | 2022.06.05 |