Notice
Recent Posts
Recent Comments
Link
«   2026/06   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

학습기록남기기

Spring Boot Repository Test 오류 본문

카테고리 없음

Spring Boot Repository Test 오류

backend_na 2022. 12. 22. 15:15

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)

를 테스트할 클래스에서 붙여야 한다 !!