Last active
February 14, 2016 21:54
-
-
Save theflofly/cdb1ec28467c9d7d293a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tcb.issue1.configuration; | |
import com.tcb.issue1.job.CarToOfferJobListener; | |
import org.springframework.batch.core.Job; | |
import org.springframework.batch.core.Step; | |
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | |
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; | |
import org.springframework.batch.core.launch.support.RunIdIncrementer; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.scheduling.annotation.EnableScheduling; | |
/** | |
* This class is the configuration class for our CarToOffer job. | |
* | |
* @author [email protected] | |
*/ | |
@Configuration | |
@EnableBatchProcessing | |
@EnableScheduling | |
public class CarToOffersJobConfiguration { | |
@Bean | |
public Job carsToOffersJob(JobBuilderFactory jobs, Step createOffersStep, CarToOfferJobListener carToOfferJobListener) { | |
return jobs.get("carsToOffersJob") | |
.incrementer(new RunIdIncrementer()) | |
.listener(carToOfferJobListener) | |
.flow(createOffersStep) | |
.end() | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment