Java源码示例:org.springframework.batch.integration.partition.BeanFactoryStepLocator
示例1
@Bean
public StepExecutionRequestHandler stepExecutionRequestHandler(
JobExplorer jobExplorer, BeanFactoryStepLocator stepLocator){
StepExecutionRequestHandler handler = new StepExecutionRequestHandler();
handler.setJobExplorer(jobExplorer);
handler.setStepLocator(stepLocator);
return handler;
}
示例2
public DeployerStepExecutionHandler(BeanFactory beanFactory, JobExplorer jobExplorer,
JobRepository jobRepository) {
Assert.notNull(beanFactory, "A beanFactory is required");
Assert.notNull(jobExplorer, "A jobExplorer is required");
Assert.notNull(jobRepository, "A jobRepository is required");
this.stepLocator = new BeanFactoryStepLocator();
((BeanFactoryStepLocator) this.stepLocator).setBeanFactory(beanFactory);
this.jobExplorer = jobExplorer;
this.jobRepository = jobRepository;
}
示例3
@Bean
public BeanFactoryStepLocator stepLocator(){
return new BeanFactoryStepLocator();
}
示例4
@Bean
public BeanFactoryStepLocator stepLocator() {
return new BeanFactoryStepLocator();
}