Error creating bean with name .. Unsatisfied dependency expressed through field '..Service';

Yeoonnii·2022년 10월 26일
0

JPA

목록 보기
3/9

오류 메세지

org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'com.example.exam_inter.ExamInterApplicationTests':
Unsatisfied dependency expressed through field 'addressService';

nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type 'com.example.service.AddressService' available: expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at ...

해결

Test에서 @Autowired 된 Service를 사용하지 않아 발생한 오류이다
주석처리를 하니 오류없이 test가 진행되었다

0개의 댓글