类 JobParameterExecutionContextCopyListener
- java.lang.Object
- org.springframework.batch.core.listener.StepExecutionListenerSupport
- org.springframework.batch.core.listener.JobParameterExecutionContextCopyListener
- 所有已实现的接口:
StepExecutionListener
,StepListener
public class JobParameterExecutionContextCopyListener extends StepExecutionListenerSupport
This class can be used to automatically copy items from theJobParameters
to theStep
ExecutionContext
. A list of keys should be provided that correspond to the items in theStep
ExecutionContext
that should be copied.- 从以下版本开始:
- 2.0
- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 JobParameterExecutionContextCopyListener()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
beforeStep(StepExecution stepExecution)
void
setKeys(java.lang.String[] keys)
从类继承的方法 org.springframework.batch.core.listener.StepExecutionListenerSupport
afterStep
构造器详细资料
JobParameterExecutionContextCopyListener
public JobParameterExecutionContextCopyListener()
方法详细资料
setKeys
public void setKeys(java.lang.String[] keys)
- 参数:
keys
- A list of keys corresponding to items in theJobParameters
that should be copied.
beforeStep
public void beforeStep(StepExecution stepExecution)
Copy attributes from theJobParameters
to theStep
ExecutionContext
, if not already present. The the key is already present we assume that a restart is in operation and the previous value is needed. If the provided keys are empty defaults to copy all keys in theJobParameters
.- 指定者:
beforeStep
在接口中StepExecutionListener
- 覆盖:
beforeStep
在类中StepExecutionListenerSupport
- 参数:
stepExecution
- instance ofStepExecution
.