31
31
import org .mybatis .spring .batch .MyBatisCursorItemReader ;
32
32
import org .springframework .batch .core .Job ;
33
33
import org .springframework .batch .core .Step ;
34
- import org .springframework .batch .core .configuration .annotation .BatchConfigurer ;
35
34
import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
36
35
import org .springframework .batch .core .configuration .annotation .JobBuilderFactory ;
37
36
import org .springframework .batch .core .configuration .annotation .StepBuilderFactory ;
42
41
import org .springframework .batch .test .JobLauncherTestUtils ;
43
42
import org .springframework .beans .factory .annotation .Autowired ;
44
43
import org .springframework .context .annotation .Bean ;
44
+ import org .springframework .context .annotation .ComponentScan ;
45
45
import org .springframework .context .annotation .Configuration ;
46
46
import org .springframework .core .convert .converter .Converter ;
47
47
import org .springframework .jdbc .datasource .embedded .EmbeddedDatabase ;
51
51
@ EnableBatchProcessing
52
52
@ Configuration
53
53
@ MapperScan ("examples.springbatch" )
54
+ @ ComponentScan ("examples.springbatch" )
54
55
public class BatchConfiguration {
55
56
56
57
@ Autowired
@@ -69,11 +70,6 @@ public DataSource dataSource() {
69
70
return db ;
70
71
}
71
72
72
- @ Bean
73
- public BatchConfigurer batchConfigurer () {
74
- return new NoPersistenceBatchConfigurer ();
75
- }
76
-
77
73
@ Bean
78
74
public SqlSessionFactoryBean sqlSessionFactoryBean (DataSource dataSource ) {
79
75
SqlSessionFactoryBean bean = new SqlSessionFactoryBean ();
@@ -82,7 +78,7 @@ public SqlSessionFactoryBean sqlSessionFactoryBean(DataSource dataSource) {
82
78
}
83
79
84
80
@ Bean
85
- public JobLauncherTestUtils jobLauncherTestUtils (Job job ) {
81
+ public JobLauncherTestUtils jobLauncherTestUtils () {
86
82
return new JobLauncherTestUtils ();
87
83
}
88
84
0 commit comments