티스토리 뷰
Architecture/Back-End
[Trouble Shooting] How to solve DataSourceBeanCreationException
HarryNam 2019. 9. 13. 14:29Trouble Shooting
I have created initial project and I get DataSourceBeanCreationException
Task :common-service:test FAILED
com.iamfullstack.common.CommonApplicationTests > contextLoads FAILED
java.lang.IllegalStateException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: org.springframework.beans.BeanInstantiationException
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException
1 test completed, 1 failed
The problem was that I was import RDB related library
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
and I have to set SQL connection properties.
spring.datasource.url=jdbc:mysql://localhost/database
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Another option is, removing import library spring-boot-starter-data-jpa
from gradle.
'Architecture > Back-End' 카테고리의 다른 글
TAG
more
Recent Post