mule - Visibility between spring:beans vs spring:bean in Spring XML config -
i using mule/ spring xml define set of spring beans.
i can create bean using following xml without wraping them in spring:beans element so:
<spring:bean id="myfactorybean" class="org.test.myfactorybean" /> but if try referencing bean doesn't work unless wrap both beans in same spring beans:element so:
<spring:beans> <spring:bean id="myfactorybean" class="org.test.myfactorybean" /> <spring:bean id="mybean" class="org.test.mybean" c:factory-ref="myfactorybean" /> </spring:beans> why have wrap them them have visibilty of each other? generic spring xml requirement?
i think problem c namespace recognized under scope of spring:beans element. same applies p namespace , other spring namespaces, context or util.
if replace c:factory-ref classic constructor argument, should work if spring:beans not wrapped spring:beans element.
but, recommend practice, have spring:beans in spring:beans wrapper element. keeps neatly organized , enables spring namespaces.
Comments
Post a Comment