We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f9ff86 commit 5352468Copy full SHA for 5352468
spring-boot-project/spring-boot-cli/samples/job.groovy
@@ -1,5 +1,7 @@
1
package org.test
2
3
+import org.springframework.transaction.TransactionManager
4
+
5
@Grab("hsqldb")
6
@Configuration(proxyBeanMethods = false)
7
@EnableBatchProcessing
@@ -10,6 +12,9 @@ class JobConfig {
10
12
11
13
@Autowired
14
private StepBuilderFactory steps
15
16
+ @Autowired
17
+ private TransactionManager transactionManager
18
19
@Bean
20
protected Tasklet tasklet() {
@@ -28,6 +33,6 @@ class JobConfig {
28
33
29
34
30
35
protected Step step1() throws Exception {
31
- return steps.get("step1").tasklet(tasklet()).build()
36
+ return steps.get("step1").tasklet(tasklet()).transactionManager(this.transactionManager).build()
32
37
}
38
0 commit comments