Inspectopedia Help

Unassignable injection point type in XML application context

Reports invalid injection point types (properties and constructor arguments).

The following injection point types are allowed: ref, idref, any collection type, inner beans, and so on.


public class InjectionValueTypes{ public List<MyBean> setListBeans() {...} public MyBean setMyBean() {...} } }
<beans> <bean class="MyBean" id="myBean"/> <bean class="ErrTypeBean" id="errTypeBean"/> <bean class="InjectionValueTypes" id="kt"> <property name="myBean" ref="errTypeBean"/> <!-- reports "Property of 'MyBean' type cannot be injected by 'ErrTypeBean'" --> <property name="listBeans"> <list> <idref local="myBean"/> <ref bean="myBean"/> <ref bean="errTypeBean"/> <!-- reports "Cannot be added in collection of 'MyBean' type" --> <bean class="ErrTypeBean"/> <!-- reports "Bean must be of 'MyBean' type" --> </list> </property> </bean> </beans>

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Spring, 241.14841

Last modified: 12 March 2024