Hello guys,
I am in a tough spot and I cannot figure it out. I am using legacy code and we are migrating from PicoContainer 1.1 to Spring 2.5. I came across code where Pico grabs the abstract class and is able to invoke concrete methods. How can I do that in Spring?
This is what I tried in Spring so far:
<bean id="module" class="a.b.c.AbstractClass" abstract="true">
<constructor-arg ref="aFactory1" index="0" />
<constructor-arg ref="aFactory2" index="1" />
</bean>
As expected, when Spring injects this code, it cannot because the bean is Abstract.
If I could, I would use MethodInvokingFactoryBean
, but that will not work as parameters are being invoked from another method which in itself is done by another bean.
How can I use Spring in a situation like this? Or should I try to push down the concrete methods defined in another class?