I'm using Spring to define stages in my application. It's configured that the necessary class (here called Configurator
) is injected with the stages.
Now I need the List of Stages in another class, named LoginBean
. The Configurator
doesn't offer access to his List of Stages.
I cannot change the class Configurator
.
My Idea:
Define a new bean called Stages and inject it to Configurator
and LoginBean
.
My problem with this idea is that I don't know how to transform this property:
<property ...>
<list>
<bean ... >...</bean>
<bean ... >...</bean>
<bean ... >...</bean>
</list>
</property>
into a bean.
Something like this does not work:
<bean id="stages" class="java.util.ArrayList">
Can anybody help me with this?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…