• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    해결됨

테스트 오류 질문드립니다!!

21.02.02 19:35 작성 조회수 1.73k

0

안녕하세요 강사님~

RepositoryCustom -  RepositoryCustomImpl 구현하고

Repository에서 RepositoryCustom상속하는 커스텀 있잖아요~

여기서 기존에 @SpringBootTest로 실행되는 통합테스트를 @DataJpaTest로 변경하니까 변경한 모든 테스트가 깨지더라고요..

빈을 생성하는 과정에서 오류가 나더라고요 ㅜㅜ

`Error creating bean with name 'memberRepositoryCustomImpl' defined in files ~ `

`No qualifying bean of type 'com.querydsl.jpa.impl.JPAQueryFactory' available: expected at least 1 bean which qualifies as autowire candidate`

단위 테스트에서는 기본적으로 Repository는 @DataJpaTest로 실행하는 걸로 알고있는데, 이럴 경우 어떤식으로 해결을 해야되는 건가요?

답변 2

·

답변을 작성해보세요.

1

단무지님의 프로필

단무지

질문자

2021.02.03

답변 감사합니다!

1

안녕하세요. 참치캔님

다음 링크를 참조해주세요.

https://www.inflearn.com/questions/23063

추가로 다음 링크에도 다양한 해결방안이 소개되어 있습니다.

https://github.com/jojoldu/blog-comments/issues/27

감사합니다.