public class StepRunner
extends java.lang.Object
Job. This is useful in
end to end testing in order to allow for the testing of a step individually
without running every Step in a job.
SimpleJob| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger
Logger
|
| Constructor and Description |
|---|
StepRunner(org.springframework.batch.core.launch.JobLauncher launcher,
org.springframework.batch.core.repository.JobRepository jobRepository) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.batch.core.JobExecution |
launchStep(org.springframework.batch.core.Step step)
Launch just the specified step as its own job.
|
org.springframework.batch.core.JobExecution |
launchStep(org.springframework.batch.core.Step step,
org.springframework.batch.item.ExecutionContext jobExecutionContext)
Launch just the specified step as its own job.
|
org.springframework.batch.core.JobExecution |
launchStep(org.springframework.batch.core.Step step,
org.springframework.batch.core.JobParameters jobParameters)
Launch just the specified step as its own job.
|
org.springframework.batch.core.JobExecution |
launchStep(org.springframework.batch.core.Step step,
org.springframework.batch.core.JobParameters jobParameters,
org.springframework.batch.item.ExecutionContext jobExecutionContext)
Launch just the specified step as its own job.
|
public StepRunner(org.springframework.batch.core.launch.JobLauncher launcher,
org.springframework.batch.core.repository.JobRepository jobRepository)
public org.springframework.batch.core.JobExecution launchStep(org.springframework.batch.core.Step step)
step - The step to launchpublic org.springframework.batch.core.JobExecution launchStep(org.springframework.batch.core.Step step,
@Nullable
org.springframework.batch.item.ExecutionContext jobExecutionContext)
step - The step to launchjobExecutionContext - An ExecutionContext whose values will be
loaded into the Job ExecutionContext prior to launching the step.public org.springframework.batch.core.JobExecution launchStep(org.springframework.batch.core.Step step,
org.springframework.batch.core.JobParameters jobParameters)
step - The step to launchjobParameters - The JobParameters to use during the launchpublic org.springframework.batch.core.JobExecution launchStep(org.springframework.batch.core.Step step,
org.springframework.batch.core.JobParameters jobParameters,
@Nullable
org.springframework.batch.item.ExecutionContext jobExecutionContext)
step - The step to launchjobParameters - The JobParameters to use during the launchjobExecutionContext - An ExecutionContext whose values will be
loaded into the Job ExecutionContext prior to launching the step.