当前位置: 首页>>代码示例>>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;未经允许,请勿转载。