File tree Expand file tree Collapse file tree 2 files changed +4
-33
lines changed
spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation Expand file tree Collapse file tree 2 files changed +4
-33
lines changed Original file line number Diff line number Diff line change 3030import org .springframework .transaction .PlatformTransactionManager ;
3131
3232/**
33- * Base {@code Configuration} class providing common structure for enabling and using Spring Batch. Customization is
34- * available by implementing the {@link BatchConfigurer} interface.
33+ * Base {@code Configuration} class providing common structure for enabling and using Spring Batch.
34+ * Customization is available by implementing the {@link BatchConfigurer} interface.
3535 *
3636 * @author Dave Syer
3737 * @author Mahmoud Ben Hassine
3838 * @since 2.2
3939 * @see EnableBatchProcessing
4040 */
4141@ Configuration (proxyBeanMethods = false )
42- public class ModularBatchConfiguration extends AbstractBatchConfiguration {
43-
44- @ Autowired
45- private ApplicationContext context ;
46-
47- @ Autowired (required = false )
48- private Collection <BatchConfigurer > configurers ;
42+ public class ModularBatchConfiguration extends SimpleBatchConfiguration {
4943
5044 private AutomaticJobRegistrar registrar = new AutomaticJobRegistrar ();
5145
52- @ Override
53- @ Bean
54- public JobRepository jobRepository () throws Exception {
55- return getConfigurer (configurers ).getJobRepository ();
56- }
57-
58- @ Override
59- @ Bean
60- public JobLauncher jobLauncher () throws Exception {
61- return getConfigurer (configurers ).getJobLauncher ();
62- }
63-
64- @ Override
65- public PlatformTransactionManager transactionManager () throws Exception {
66- return getConfigurer (configurers ).getTransactionManager ();
67- }
68-
69- @ Override
70- @ Bean
71- public JobExplorer jobExplorer () throws Exception {
72- return getConfigurer (configurers ).getJobExplorer ();
73- }
74-
7546 /**
7647 * Creates a {@link AutomaticJobRegistrar} bean.
7748 *
Original file line number Diff line number Diff line change 4747public class SimpleBatchConfiguration extends AbstractBatchConfiguration {
4848
4949 @ Autowired
50- private ApplicationContext context ;
50+ protected ApplicationContext context ;
5151
5252 @ Autowired (required = false )
5353 private Collection <BatchConfigurer > configurers ;
You can’t perform that action at this time.
0 commit comments