【发布时间】:2013-04-04 20:37:17
【问题描述】:
我是 Spring Batch 的新手,在我的开发过程中,我遇到了一个需要访问 ItemProcessor 上的 jobParameter 的场景。我已经在阅读器上完成了此操作(MultiresourceReader 和 StaxeventItemReader 也使用我构建的 CustomReader)并且成功,我可以检索 jobParameter 但不能使用 ItemProcessor。
这是我的sn-p。
<bean id="myProcessor" class="com.......MyCustomProcessor" scope="step">
<property name="myBean" ref="customBean"/>
</bean>
<bean id="customBean" class="...................MyCustomBean" scope="step">
<property name="file" value="#{jobParameters['FILE']}/fileName.txt"/>
</bean>
它正在产生一个lazyBinding 异常。关于如何在项目处理器上检索 jobParameter 的任何想法?
【问题讨论】:
标签: spring-batch