Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception with message: Failed to load driver class org.h2.Driver in either of HikariConfig class loader or Thread context classloader
Spring Data Jpa를 사용 후 실행 시 에러 발생
찾아보니 크게 두가지의 문제점이 있다.
h2 db의 기준이다.
runtimeOnly 'com.h2database:h2'
application.properties에 추가
spring.datasource.driverClassName=org.h2.Driver