인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

최원호님의 프로필 이미지
최원호

작성한 질문수

스프링 핵심 원리 - 기본편

@Autowired 필드 명, @Qualifier, @Primary

UnsatisfiedDependencyException:

작성

·

514

0

public void basicScan()을 붙이고 시행 했는데 다음과 같은 에러가 났습니다.

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'orderServiceImpl' defined in file [D:\core\out\production\classes\hello\core\order\OrderServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'hello.core.discount.DiscountPolicy' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier("mainDiscountPolicy")}

어덯게 수정해야 하나요?

답변 1

0

안녕하세요. 최원호님, 공식 서포터즈 OMG입니다.

아래 영한님의 설명을 참고해주세요.

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

감사합니다.

 

 
최원호님의 프로필 이미지
최원호

작성한 질문수

질문하기