I'm new to the extensible xml authoring support in spring 2.0 so please bear with me if my question sounds very basic.
I'm trying to simplify the bean definition files that we have in our product and am not able to find a solution to simplify a bean definition which looks something like below:
<bean id="fooId" class="mypackage.FooClass" singleton="true">
<property name="text" value="foo" />
</bean>
<bean id="barId" class="mypackage.BarClass">
<property name="refBean" ref="fooId" />
</bean>
to something like:
<mynamespace:foo text="foo"/>
<mynamespace:bar refBean="fooId"/>
Basically, I'm not sure whether there is some neat way to define a BeanDefinitionParser implementation for element "mynamespace:bar" so that I can specify in its bean definition that I want to use the singleton bean with id=fooId?
Thanks in advance for the help


Reply With Quote