如何添加屬性: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