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 があります。 -->
<!-- Beans: otherBean,fooBean. プロパティ: 'fooInterface' " が報告されます -->
</beans>