File tree Expand file tree Collapse file tree 6 files changed +48
-6
lines changed
spring-batch-capitalize-names/src/main/java/com/codenotfound/batch/job
spring-batch-hello-world/src/main/java/com/codenotfound/batch/job
spring-batch-tasklet/src/main/java/com/codenotfound/batch/job Expand file tree Collapse file tree 6 files changed +48
-6
lines changed Original file line number Diff line number Diff line change
1
+ package com .codenotfound .batch .job ;
2
+
3
+ import javax .sql .DataSource ;
4
+ import org .springframework .batch .core .configuration .annotation .DefaultBatchConfigurer ;
5
+ import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
6
+ import org .springframework .context .annotation .Configuration ;
7
+
8
+ @ Configuration
9
+ @ EnableBatchProcessing
10
+ public class BatchConfig extends DefaultBatchConfigurer {
11
+
12
+ @ Override
13
+ public void setDataSource (DataSource dataSource ) {
14
+ // initialize will use a Map based JobRepository (instead of database)
15
+ }
16
+ }
Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .batch .core .Job ;
4
4
import org .springframework .batch .core .Step ;
5
- import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
6
5
import org .springframework .batch .core .configuration .annotation .JobBuilderFactory ;
7
6
import org .springframework .batch .core .configuration .annotation .StepBuilderFactory ;
8
7
import org .springframework .batch .item .file .FlatFileItemReader ;
16
15
import com .codenotfound .model .Person ;
17
16
18
17
@ Configuration
19
- @ EnableBatchProcessing
20
18
public class CapitalizeNamesJobConfig {
21
19
22
20
@ Bean
Original file line number Diff line number Diff line change
1
+ package com .codenotfound .batch .job ;
2
+
3
+ import javax .sql .DataSource ;
4
+ import org .springframework .batch .core .configuration .annotation .DefaultBatchConfigurer ;
5
+ import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
6
+ import org .springframework .context .annotation .Configuration ;
7
+
8
+ @ Configuration
9
+ @ EnableBatchProcessing
10
+ public class BatchConfig extends DefaultBatchConfigurer {
11
+
12
+ @ Override
13
+ public void setDataSource (DataSource dataSource ) {
14
+ // initialize will use a Map based JobRepository (instead of database)
15
+ }
16
+ }
Original file line number Diff line number Diff line change 2
2
3
3
import org .springframework .batch .core .Job ;
4
4
import org .springframework .batch .core .Step ;
5
- import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
6
5
import org .springframework .batch .core .configuration .annotation .JobBuilderFactory ;
7
6
import org .springframework .batch .core .configuration .annotation .StepBuilderFactory ;
8
7
import org .springframework .batch .item .file .FlatFileItemReader ;
17
16
import com .codenotfound .model .Person ;
18
17
19
18
@ Configuration
20
- @ EnableBatchProcessing
21
19
public class HelloWorldJobConfig {
22
20
23
21
@ Bean
Original file line number Diff line number Diff line change
1
+ package com .codenotfound .batch .job ;
2
+
3
+ import javax .sql .DataSource ;
4
+ import org .springframework .batch .core .configuration .annotation .DefaultBatchConfigurer ;
5
+ import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
6
+ import org .springframework .context .annotation .Configuration ;
7
+
8
+ @ Configuration
9
+ @ EnableBatchProcessing
10
+ public class BatchConfig extends DefaultBatchConfigurer {
11
+
12
+ @ Override
13
+ public void setDataSource (DataSource dataSource ) {
14
+ // initialize will use a Map based JobRepository (instead of database)
15
+ }
16
+ }
Original file line number Diff line number Diff line change 5
5
import org .slf4j .LoggerFactory ;
6
6
import org .springframework .batch .core .Job ;
7
7
import org .springframework .batch .core .Step ;
8
- import org .springframework .batch .core .configuration .annotation .EnableBatchProcessing ;
9
8
import org .springframework .batch .core .configuration .annotation .JobBuilderFactory ;
10
9
import org .springframework .batch .core .configuration .annotation .StepBuilderFactory ;
11
10
import org .springframework .batch .item .file .FlatFileItemReader ;
23
22
import com .codenotfound .model .Person ;
24
23
25
24
@ Configuration
26
- @ EnableBatchProcessing
27
25
public class CapitalizeNamesJobConfig {
28
26
29
27
private static final Logger LOGGER = LoggerFactory .getLogger (CapitalizeNamesJobConfig .class );
You can’t perform that action at this time.
0 commit comments