Can someone tell me the difference and which one has to be used when ?
<bean id="b1" class="" />
<bean id="" class="">
<property name="b1" ref="b1" />
</bean>
vs
<bean id="" class="">
<property name="b1" idref="b1" />
</bean>
Can someone tell me the difference and which one has to be used when ?
<bean id="b1" class="" />
<bean id="" class="">
<property name="b1" ref="b1" />
</bean>
vs
<bean id="" class="">
<property name="b1" idref="b1" />
</bean>
"ref" is used to pass the bean that the ref refers to. "idref" is used to pass the name of the bean (as a String) that is referred to.