I have recently discovered a great feature in Spring:
<property name="propertyToSet">This is much nicer in my opinion than
<util:property-path path="aBean.aProperty"/>
</property>
<property name="propertyToSet">It is also more powerful because you can do things like
<bean factory-bean="aBean" factory-method="getAProperty"/>
</property>
<property name="propertyToSet">which otherwise would have been awkward.
<util:property-path path="aBean.aProperty.aNestedProperty"/>
</property>
However I do want an improvement. I want a yet more concise syntax for this. Spring can already do this:
<property name="aPropertyToSet" value="true"/>So it would only be logical (and very-very nice!) if it could also do this:
<property name="aPropertyToSet" ref="anotherBean"/>
<property name="propertyToSet" path="aBean.aProperty"/>