ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Twelve Best Practices For Spring XML Configurations
Subject:   Use idref for bean names
Date:   2006-02-08 11:09:07
From:   wpoitras
For properties that accept the name of beans instead of the beans themselves. That allows making sure a bean exists:

<property name="targetBeanName" value="myBean"/>

You can say:

<property name="targetBeanName>
<idref local="myBean"/>