let's say I have a factory bean:
<bean id="myFactory" class="com.company.MyFactory" lazy-init="true"> <property name="myProperty" ref="propA"> </bean>
Let's say propA is a bean introduced by IOC used in the factory method. And I have 2 beans generated from this factory:
<bean id="bean1" factory-bean="myFactory" factory-method="instance"/> <bean id="bean2" factory-bean="myFactory" factory-method="instance"/>
How can I get bean2 to use a different myProperty than bean1 without using a different factory method? Or, how can I pass propA as a parameter to the factory method from the configuration of bean1 or bean2?
plus- source share