Align with breaking changes in latest Batch snapshots

Batch is now auto-configured to use the context's
PlatformTransactionManager and DataSource or `@BatchDataSource`.
When this does not meet the user's needs, they can use
`@EnableBatchProcessing` or sub-class `DefaultBatchConfiguration` to
take complete control with the auto-configuration backing off.

Closes gh-32330
This commit is contained in:
Andy Wilkinson
2022-09-20 15:39:56 +01:00
parent dc56fa62bc
commit 64f4da80cb
9 changed files with 101 additions and 412 deletions

View File

@@ -18,7 +18,6 @@ package smoketest.batch;
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.job.builder.JobBuilder;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.builder.StepBuilder;
@@ -30,7 +29,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.transaction.PlatformTransactionManager;
@SpringBootApplication
@EnableBatchProcessing
public class SampleBatchApplication {
@Bean