Hi,
I have a bean definition basically like this:
I use this bean definition as part of a module that gets plugged intoCode:<bean id="factory"> <property name="listeners"> <map> <entry type="type1"> <list> <bean class="listener.type.one" /> <bean class="listener.type.two" /> </list> </entry> </map> </property> </bean>
a number of larger applications. In one of these apps, I have to redo
this definition because I have a third listener.
What I want do is, to define the listeners in a properties file, e.g.
and for my special case:Code:factory.listeners.type1 = listener.type.one, listener.type.two
and use some sort of placeholder replacement for theCode:factory.listeners.type1 = listener.type.one, listener.type.two, listener.type.three
block of the bean definition. Or just the list itself. I scratched myCode:<list> <bean class="listener.type.one" /> <bean class="listener.type.two" /> </list>
head over BeanFactoryPostProcessor definitions but I simply can not
see a way to intercept the List creation at bean creation time or the
variable number of elements at declaration time. I'm very grateful for
hints.
Thanks
Henning


Reply With Quote