mirror of
https://github.com/spring-projects/spring-batch.git
synced 2024-08-29 02:36:21 +08:00
Updated Spring Batch 5.0 Migration Guide (markdown)
parent
7ddd814666
commit
dc9d9e4bbc
@ -132,10 +132,15 @@ public class MyStepConfig {
|
|||||||
@EnableBatchProcessing
|
@EnableBatchProcessing
|
||||||
public class MyStepConfig {
|
public class MyStepConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Tasklet myTasklet() {
|
||||||
|
return new MyTasklet();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public Step myStep(JobRepository jobRepository, Tasklet myTasklet, PlatformTransactionManager transactionManager) {
|
public Step myStep(JobRepository jobRepository, Tasklet myTasklet, PlatformTransactionManager transactionManager) {
|
||||||
return new StepBuilder("myStep", jobRepository)
|
return new StepBuilder("myStep", jobRepository)
|
||||||
.tasklet(myTasklet, transactionManager)
|
.tasklet(myTasklet, transactionManager) // or .chunk(chunkSize, transactionManager)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user