Skip to content

Commit 28e3f04

Browse files
rchandavaramfmbenhassine
authored andcommitted
Improve code example in "Configuring and Running a Job" section
The sample that shows how to provide a custom transaction manager via a BatchConfigurer has been updated to use the constructor of `DefaultBatchConfigurer` that takes a DataSource. Issue #3888
1 parent 67e3990 commit 28e3f04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-batch-docs/asciidoc/job.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ The core interface for this configuration is the `BatchConfigurer`.
460460
[source, java]
461461
----
462462
@Bean
463-
public BatchConfigurer batchConfigurer() {
464-
return new DefaultBatchConfigurer() {
463+
public BatchConfigurer batchConfigurer(DataSource dataSource) {
464+
return new DefaultBatchConfigurer(dataSource) {
465465
@Override
466466
public PlatformTransactionManager getTransactionManager() {
467467
return new MyTransactionManager();

0 commit comments

Comments
 (0)