【发布时间】:2011-10-03 16:29:34
【问题描述】:
我需要在代码执行期间“动态”创建对象的原型范围实例。
我知道查找方法会是很好的解决方案:
<!-- a stateful bean deployed as a prototype (non-singleton) -->
<bean id="command" class="fiona.apple.AsyncCommand" scope="prototype">
<!-- inject dependencies here as required -->
</bean>
<!-- commandProcessor uses statefulCommandHelper -->
<bean id="commandManager" class="fiona.apple.CommandManager">
<lookup-method name="createCommand" bean="command"/>
</bean>
我可以将参数设置为createCommand 方法吗?
【问题讨论】: