[스프링부트(SpringBoot)] 에러해결: contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:
2024. 11. 18. 00:57
문제/에러
> Task :test FAILED DemoProjectApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1806 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/t24209/SpringBoot/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. BUILD FAILED in 4s 8 actionable tasks: 8 executed
해결방법
아래의 파일에서 DB 관련 설정이 제대로 되어있는지 확인한다.
main/resources/application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/[db명]
spring.datasource.username=[db아이디]
spring.datasource.password=[패스워드]