如何添加属性:Spring Batch的:作业属性
<property name="myProperty" value="value"/>
到批处理作业定义:
<batch:job id="MyJob">
<batch:description>description</batch:description>
<batch:step id="step0">
<batch:tasklet ref="MyJobCls"/>
<batch:listeners>
<batch:listener ref="MyJobkListener"/>
</batch:listeners>
</batch:step>
</batch:job>
然后我可以在运行时使用此属性。
谢谢您的回答,即时寻找添加属性为Spring Batch的作业(而不是普通的bean)<批次:作业id =“MyJob”> – Yosefarr 2013-04-25 11:47:08
,所以你想拥有在ChunkContext那些PARAMS? (ChunkContext.getStepContext()。getStepExecution()。getJobExecution()。getExecutionContext()) – user1121883 2013-04-25 14:35:37
你能描述你打算如何使用属性? – 2013-04-26 00:27:11