같은 빈 이름이 등록되면 어떻게 될까?
자동빈 등록 vs 자동빈 등록의 경우 : 스피링에서 예외를 발생시킴
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [hello11.core.AutoAppConfig]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'service' for bean class [hello11.core.member.MemoryMemberRepository] conflicts with existing, non-compatible bean definition of same name and class [hello11.core.member.MemberServiceImpl]
내용을 보면
BeanDefinitionStoreException
-> ConflictingBeanDefinitionException
-> Annotation-specified bean name 'service' for bean class [hello11.core.member.MemoryMemberRepository] conflicts with existing, non-compatible bean definition of same name and class [hello11.core.member.MemberServiceImpl]
이라는 것을 알 수 있다.