3131import org .mybatis .spring .batch .MyBatisCursorItemReader ;
3232import org .springframework .batch .core .Job ;
3333import org .springframework .batch .core .Step ;
34- import org .springframework .batch .core .configuration .annotation .BatchConfigurer ;
3534import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
3635import org .springframework .batch .core .configuration .annotation .JobBuilderFactory ;
3736import org .springframework .batch .core .configuration .annotation .StepBuilderFactory ;
4241import org .springframework .batch .test .JobLauncherTestUtils ;
4342import org .springframework .beans .factory .annotation .Autowired ;
4443import org .springframework .context .annotation .Bean ;
44+ import org .springframework .context .annotation .ComponentScan ;
4545import org .springframework .context .annotation .Configuration ;
4646import org .springframework .core .convert .converter .Converter ;
4747import org .springframework .jdbc .datasource .embedded .EmbeddedDatabase ;
5151@ EnableBatchProcessing
5252@ Configuration
5353@ MapperScan ("examples.springbatch" )
54+ @ ComponentScan ("examples.springbatch" )
5455public class BatchConfiguration {
5556
5657 @ Autowired
@@ -69,11 +70,6 @@ public DataSource dataSource() {
6970 return db ;
7071 }
7172
72- @ Bean
73- public BatchConfigurer batchConfigurer () {
74- return new NoPersistenceBatchConfigurer ();
75- }
76-
7773 @ Bean
7874 public SqlSessionFactoryBean sqlSessionFactoryBean (DataSource dataSource ) {
7975 SqlSessionFactoryBean bean = new SqlSessionFactoryBean ();
@@ -82,7 +78,7 @@ public SqlSessionFactoryBean sqlSessionFactoryBean(DataSource dataSource) {
8278 }
8379
8480 @ Bean
85- public JobLauncherTestUtils jobLauncherTestUtils (Job job ) {
81+ public JobLauncherTestUtils jobLauncherTestUtils () {
8682 return new JobLauncherTestUtils ();
8783 }
8884
0 commit comments