-
Nov 19th, 2009, 09:36 PM
#1
ref vs idref attributes in spring bean declaration
ref vs idref attributes in spring bean declaration.
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>
I do have a reference to the following thread, but it doesn't say when to use one over the other.
http://forum.springsource.org/showthread.php?t=74355
-
Nov 19th, 2009, 11:46 PM
#2
- 'idref' is not a valid spring <bean> element attribute. You get corresponding error if you attempt to start the container with such a configuration;
- The reference is quite cleat about <idref> element usage - 3.3.2.1.1. The idref element;
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules