I have a spring bean defined outside my control. I want to set a property in that spring bean, is that possible from spring XML?
e.g.
a.xml (not controlled by me):
<bean id="a" class="A"/>
<bean id="b" class="B">
<constructor-arg ref="a"/>
</bean>
b.xml (controlled by me)
<import resource="classpath:META-INF/a.xml"/>
<bean id="c" class="C"/>
<!-- here i want to set a property in bean a -->
One option, but I dont’ like it is to set the property programatically.
I’m using spring 2.5 in java.
You could inject the
bean-ainto another class and set it’s property thereSo your class MySetterClass could do something like
This is a pretty ugly approach, but it should work.