강의

멘토링

커뮤니티

Inflearn Community Q&A

nhs0912's profile image
nhs0912

asked

Yoon Jae-seong's introductory course through hands-on experience for Spring Framework developers

Lecture 18: Bean Configuration using Annotations

31:15초에 내용 문의

Written on

·

249

0

[31:15초에 내용 문의]

여기 보면 Qualifier 주석 처리 하고서 실행하면 에러 안난다고 하는데 에러가 나네요...

Error creating bean with name 'xml1': Unsatisfied dependency expressed through field 'data6'; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'kr.co.softcampus.beans.DataBean2' available: expected single matching bean but found 2: obj4,obj5

이런식으로 에러 나는데...에러나는게 정상인거겠죠?? 

영상에서는 오류 발생 안됩니다 하고 실행안해보고 그냥 넘어가서...저게 맞는건지 모르겠네요 ㅠ 

javaspring

Answer 2

0

DataBean2 타입의 빈이 두개가 정의되어있으니 오류 나는게 정상입니다. 강의에서는 같은 타입의 빈이 여러개 등록돼있지 않은 일반적인 경우를 상정해서 대략 설명해주신것같습니다.

0

nury님의 프로필 이미지
nury
Instructor

확인해보도록 하겠습니다. 

nhs0912's profile image
nhs0912

asked

Ask a question