本文整理匯總了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();
}