XML 애플리케이션 컨텍스트에서 구성된 Spring bean의 잘못된 오토와이어링을 보고합니다.
예:
public interface FooInterface {...}
@Component public class FooBean implements FooInterface {...}
@Component public class OtherBean implements FooInterface {...}
@Component
public class MyComponent {
public void setFooInterface(FooInterface foo) {...}
}
<beans>
<bean class="beans.OtherBean" id="otherBean"/>
<bean class="beans.FooBean" id="fooBean"/>
<bean autowire="byType" class="beans.MyComponent" id="foo"/> <!-- "오토와이어링을 수행할 수 없습니다. 'FooInterface' 타입의 bean이 2개 이상 있습니다. -->
<!-- Beans: otherBean,fooBean. 프로퍼티: 'fooInterface' "--> 라고 보고됩니다
</beans>