Is there a spring batch “job” scope?

隐身守侯 提交于 2019-12-05 02:23:37
Raphaël Brugier

A jira has been opened some times ago on the spring batch issues tracker regarding this issue: https://jira.springsource.org/browse/BATCH-1701

A pull request has been submitted as well, hopefully it will be merge soon, because I have this use case too: https://github.com/SpringSource/spring-batch/pull/41

There are multiple workarounds in the mean time, each with its drawback, see this answer on stackoverflow: https://stackoverflow.com/a/8121102/470107

Finally Spring Batch 3.0 supports now the Job Scope : What's new in Spring Batch 3.0

if your dataHolder bean holds state you could try it with a proper bean scope e.g. prototype

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!