defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans
.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]:
Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName
jdbcUrl is required with driverClassName.
이라는 에러가 나왔다.
Spring boot에서 MySQL을 연동하는 과정에서 나온 에러이다.
해결 :
application.properties에 설정해둔 원래 코드는 이러 했다.
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/(스키마이름)?serverTimezone=UTC&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=1234
여기서 두번째 줄의 spring.datasource.url의 문제였다
수정 코드는
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.jdbc-url=jdbc:mysql://localhost:3306/(스미카이름)?serverTimezone=UTC&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=1234
url을 jdbc-url로 수정해주었다. 해결!
출처 : https://dev-yujji.tistory.com/15#comment13183979