Reputation: 43
In Spring 3.0 and higher it is possible to refer a property of another bean as below.
<bean id="a" class="A">
<property name="list"
value="#{b.list}"/>
</bean>
Is there a way I can refer property of another bean in Spring 2.5.1. Note that Spring Expression integrated after Spring 3.0
Upvotes: 0
Views: 41
Reputation: 5649
Spring is a framework for dependency injection and not for value injection. If your bean a has dependency on bean b for its creation, then why not inject the bean b in bean a.
Spring do give limited feature for injecting values but that is only for configuring the components i.e. beans.
Upvotes: 0