RESOLVED - issue BATCH-1411: Allow a Job to specify its required JobParameters
Fix build
This commit is contained in:
@@ -13,6 +13,8 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.core.BatchStatus;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParametersInvalidException;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.launch.JobOperator;
|
||||
import org.springframework.batch.core.launch.JobParametersNotFoundException;
|
||||
@@ -231,5 +233,11 @@ public class SkipSampleFunctionalTests {
|
||||
catch (JobInstanceAlreadyCompleteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (UnexpectedJobExecutionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
catch (JobParametersInvalidException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ import java.util.List;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersIncrementer;
|
||||
import org.springframework.batch.core.JobParametersInvalidException;
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
@@ -96,6 +98,10 @@ public class JobSupport implements BeanNameAware, Job {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void validate(JobParameters parameters) throws JobParametersInvalidException {
|
||||
// no-op
|
||||
}
|
||||
|
||||
public void setSteps(List<Step> steps) {
|
||||
this.steps.clear();
|
||||
|
||||
Reference in New Issue
Block a user