학습기록남기기
Spring Boot Repository Test 오류 본문
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to replace DataSource with an embedded database for tests. If you want an embedded database please put a supported one on the classpath or tune the replace attribute of @AutoConfigureTestDatabase.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
---> 실제 DB를 사용할 생각으로 yml파일들을 세팅해 놨는데 , 이를 위해서
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
를 테스트할 클래스에서 붙여야 한다 !!