當前位置: 首頁>>代碼示例>>Java>>正文


Java JobBuilderFactory類代碼示例

本文整理匯總了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();
}
 
開發者ID:livelessons-spring,項目名稱:building-microservices,代碼行數:18,代碼來源:BatchConfiguration.java

示例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;
}
 
開發者ID:mintster,項目名稱:nixmash-blog,代碼行數:9,代碼來源:DemoJobConfiguration.java

示例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();
}
 
開發者ID:mminella,項目名稱:TaskMadness,代碼行數:10,代碼來源:MooreStatConfiguration.java

示例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();
}
 
開發者ID:create1st,項目名稱:spring-batch,代碼行數:12,代碼來源:BatchConfiguration.java

示例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();
}
 
開發者ID:SoatGroup,項目名稱:json-file-itemwriter,代碼行數:10,代碼來源:BatchConfiguration.java

示例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();
}
 
開發者ID:SoatGroup,項目名稱:json-file-itemwriter,代碼行數:10,代碼來源:BatchConfiguration.java

示例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();
}
 
開發者ID:marklogic-community,項目名稱:marklogic-spring-batch,代碼行數:9,代碼來源:YourTwoStepJobConfig.java

示例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();
}
 
開發者ID:trisberg,項目名稱:springone-2015,代碼行數:9,代碼來源:BatchHive2Configuration.java

示例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();
}
 
開發者ID:trisberg,項目名稱:springone-2015,代碼行數:8,代碼來源:SparkYarnConfiguration.java

示例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();
}
 
開發者ID:nfrankel,項目名稱:jplantuml,代碼行數:9,代碼來源:PlantUmlConfig.java

示例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);
}
 
開發者ID:OHDSI,項目名稱:WebAPI,代碼行數:6,代碼來源:JobConfig.java

示例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();
}
 
開發者ID:sidnan,項目名稱:spring-batch-scheduler-example,代碼行數:17,代碼來源:BatchConfiguration.java

示例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();
}
 
開發者ID:joshlong,項目名稱:javaconfig-ftw,代碼行數:8,代碼來源:BatchConfiguration.java


注:本文中的org.springframework.batch.core.configuration.annotation.JobBuilderFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。