Java Spring anonymous bean without parent
I try to understand code:
<bean id="topBean" class="com.topBean" >
<property name="helpbean" ref="helpBean" />
<property name="topFolder">
<bean parent="someparent">
<property name="propertyName" value="value1"/>
</bean>
</property>
</bean>
I try 开发者_JAVA技巧to find parent bean with name "someparent" but without success. Is it allowed?
There has to be a bean called someParent
somewhere in the context, or in a parent context. It's not valid otherwise.
Remember, contexts can themselves have parent contexts. Beans in a child context can refer to bean in their parent contexts.
精彩评论