작성
·
249
2
오류가 발생합니다.
JUnit5를 사용하였으며
testMember()에서
Unsatisfied dependency expressed through field 'memberRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'jpabook.jpashop.MemberRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jpabook.jpashop.MemberRepositoryTest': Unsatisfied dependency expressed through field 'memberRepository'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'jpabook.jpashop.MemberRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
의 에러가 발생합니다.
구글링 시 @Repository 또는 @Service 애노테이션을 빼먹으면 발생하는 오류라고 하지만, 애노테이션은 모두 작성하였습니다.
성빈님 스스로 잘 해결하셨습니다^^