Inspectopedia
 
2024.3

Inconsistent injection value in XML application context

Error
New
Last modified: 03 December 2024

Reports inconsistent tags and attributes on injection points in XML application contexts.

  • <property> and <constructor-arg> must specify a ref, value, or a sub-element

  • <property> and <constructor-arg> cannot contain more than one sub-element

  • <ref> can contain either a bean attribute, a local attribute, or a parent attribute

  • <ref> must specify a bean

  • <idref> can contain either a bean attribute or a local attribute

  • <idref> must specify a bean

  • <map> must specify a key

  • <idref> can contain either a key attribute, a key-ref attribute, or a <key> sub-element

Example: