本文整理汇总了Java中org.springframework.batch.core.configuration.annotation.JobBuilderFactory类的典型用法代码示例。如果您正苦于以下问题:Java JobBuilderFactory类的具体用法?Java JobBuilderFactory怎么用?Java JobBuilderFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JobBuilderFactory类属于org.springframework.batch.core.configuration.annotation包,在下文中一共展示了JobBuilderFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: personEtl
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
Job personEtl(JobBuilderFactory jobBuilderFactory,
StepBuilderFactory stepBuilderFactory,
FlatFileItemReader<Person> reader,
JdbcBatchItemWriter<Person> writer
) {
Step step = stepBuilderFactory.get("file-to-database")
.<Person, Person>chunk(5)
.reader(reader)
.writer(writer)
.build();
return jobBuilderFactory.get("etl")
.start(step)
.build();
}
示例2: DemoJobConfiguration
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Autowired
public DemoJobConfiguration(EntityManagerFactory entityManagerFactory, DemoJobListener demoJobListener, DemoJobStepListener demoJobStepListener, StepBuilderFactory stepBuilderFactory, JobBuilderFactory jobBuilderFactory) {
this.entityManagerFactory = entityManagerFactory;
this.demoJobListener = demoJobListener;
this.demoJobStepListener = demoJobStepListener;
this.stepBuilderFactory = stepBuilderFactory;
this.jobBuilderFactory = jobBuilderFactory;
}
示例3: init
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Before
public void init() throws Exception {
this.context.register(BatchConfiguration.class);
this.context.refresh();
JobRepository jobRepository = this.context.getBean(JobRepository.class);
this.jobLauncher = this.context.getBean(JobLauncher.class);
this.jobs = new JobBuilderFactory(jobRepository);
PlatformTransactionManager transactionManager = this.context
.getBean(PlatformTransactionManager.class);
this.steps = new StepBuilderFactory(jobRepository, transactionManager);
this.step = this.steps.get("step").tasklet(new Tasklet() {
@Override
public RepeatStatus execute(StepContribution contribution,
ChunkContext chunkContext) throws Exception {
return null;
}
}).build();
this.job = this.jobs.get("job").start(this.step).build();
this.jobExplorer = this.context.getBean(JobExplorer.class);
this.runner = new JobLauncherCommandLineRunner(this.jobLauncher,
this.jobExplorer);
this.context.getBean(BatchConfiguration.class).clear();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:24,代码来源:JobLauncherCommandLineRunnerTests.java
示例4: BlackDuckFortifyPhoneHomeJobConfig
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Autowired
public BlackDuckFortifyPhoneHomeJobConfig(JobLauncher jobLauncher, JobBuilderFactory jobBuilderFactory,
StepBuilderFactory stepBuilderFactory, HubServices hubServices, PropertyConstants propertyConstants) {
this.jobLauncher = jobLauncher;
this.jobBuilderFactory = jobBuilderFactory;
this.stepBuilderFactory = stepBuilderFactory;
this.hubServices = hubServices;
this.propertyConstants = propertyConstants;
}
开发者ID:blackducksoftware,项目名称:hub-fortify-ssc-integration-service,代码行数:10,代码来源:BlackDuckFortifyPhoneHomeJobConfig.java
示例5: importUserJob
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job importUserJob(JobBuilderFactory jobs, Step s1, JobExecutionListener executionListener) {
return jobs.get("importUserJob")
.incrementer(new RunIdIncrementer())
.listener(executionListener)
.flow(s1)
.end()
.build();
}
示例6: importTicketsJob
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job importTicketsJob(final JobBuilderFactory jobs,
final Step importTicketStep,
final TicketImportJobExecutionListener ticketImportJobExecutionListener) {
return jobs.get("importTicketsJob")
.incrementer(new RunIdIncrementer())
.listener(ticketImportJobExecutionListener)
.flow(importTicketStep)
.end()
.build();
}
示例7: writeStepJob
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job writeStepJob(JobBuilderFactory jobs, Step stepOne, JobExecutionListener listener) {
return jobs.get("writeStepJob")
.incrementer(new RunIdIncrementer())
.listener(listener)
.flow(stepOne)
.end()
.build();
}
示例8: writeJsonFormatJob
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job writeJsonFormatJob(JobBuilderFactory jobs, Step stepOne, JobExecutionListener listener) {
return jobs.get("JsonWriter")
.incrementer(new RunIdIncrementer())
.listener(listener)
.flow(stepOne)
.end()
.build();
}
示例9: job
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job job(JobBuilderFactory jobBuilderFactory, Step step1, Step step2) {
return jobBuilderFactory.get(JOB_NAME)
.start(step1)
.next(step2)
.incrementer(new RunIdIncrementer())
.build();
}
示例10: tweetInfluencers
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
Job tweetInfluencers(JobBuilderFactory jobs, Step hiveInfluencers, Step exportInfluencers, Step results) throws Exception {
return jobs.get("TweetInfluencers")
.start(hiveInfluencers)
.next(exportInfluencers)
.next(results)
.build();
}
示例11: tweetHashtags
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
Job tweetHashtags(JobBuilderFactory jobs, Step initScript, Step sparkTopHashtags) throws Exception {
return jobs.get("TweetTopHashtags")
.start(initScript)
.next(sparkTopHashtags)
.build();
}
示例12: plantUmlJob
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job plantUmlJob(JobBuilderFactory jobs, Step s1) {
return jobs.get("plantUmlJob")
.incrementer(new RunIdIncrementer())
.flow(s1)
.end()
.build();
}
示例13: jobTemplate
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public JobTemplate jobTemplate(final JobLauncher jobLauncher, final JobBuilderFactory jobBuilders,
final StepBuilderFactory stepBuilders) {
return new JobTemplate(jobLauncher, jobBuilders, stepBuilders);
}
示例14: importPerson
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
/**
* This method declare the steps that the batch has to follow
*
* @param jobs
* @param s1
* @return
*/
@Bean
public Job importPerson(JobBuilderFactory jobs, Step s1) {
return jobs.get("import")
.incrementer(new RunIdIncrementer()) // because a spring config bug, this incrementer is not really useful
.flow(s1)
.end()
.build();
}
示例15: customerLoaderJob
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; //导入依赖的package包/类
@Bean
public Job customerLoaderJob(JobBuilderFactory jobs, @Qualifier(readCsvFileIntoTableStep) Step s1) {
return jobs.get(customerLoaderJob)
.flow(s1)
.end()
.build();
}