use of org.springframework.batch.core.launch.support.SimpleJobOperator in project spring-boot by spring-projects.
the class BatchAutoConfiguration method jobOperator.
@Bean
@ConditionalOnMissingBean(JobOperator.class)
public SimpleJobOperator jobOperator(JobExplorer jobExplorer, JobLauncher jobLauncher, ListableJobLocator jobRegistry, JobRepository jobRepository) throws Exception {
SimpleJobOperator factory = new SimpleJobOperator();
factory.setJobExplorer(jobExplorer);
factory.setJobLauncher(jobLauncher);
factory.setJobRegistry(jobRegistry);
factory.setJobRepository(jobRepository);
if (this.jobParametersConverter != null) {
factory.setJobParametersConverter(this.jobParametersConverter);
}
return factory;
}
use of org.springframework.batch.core.launch.support.SimpleJobOperator in project RecordManager2 by moravianlibrary.
the class AppConfig method jobOperator.
@Bean
public JobOperator jobOperator() throws Exception {
SimpleJobOperator jobOperator = new SimpleJobOperator();
jobOperator.setJobRepository(jobRepository());
jobOperator.setJobRegistry(jobRegistry());
jobOperator.setJobLauncher(jobLauncher());
jobOperator.setJobExplorer(jobExplorer());
return jobOperator;
}
use of org.springframework.batch.core.launch.support.SimpleJobOperator in project spring-boot by spring-projects.
the class BatchAutoConfiguration method jobOperator.
@Bean
@ConditionalOnMissingBean(JobOperator.class)
public SimpleJobOperator jobOperator(ObjectProvider<JobParametersConverter> jobParametersConverter, JobExplorer jobExplorer, JobLauncher jobLauncher, ListableJobLocator jobRegistry, JobRepository jobRepository) throws Exception {
SimpleJobOperator factory = new SimpleJobOperator();
factory.setJobExplorer(jobExplorer);
factory.setJobLauncher(jobLauncher);
factory.setJobRegistry(jobRegistry);
factory.setJobRepository(jobRepository);
jobParametersConverter.ifAvailable(factory::setJobParametersConverter);
return factory;
}
Aggregations