From 284b7dcff8ecb691aed64f7473a2f3df5f8d5860 Mon Sep 17 00:00:00 2001 From: Rajesh Chandavaram Date: Mon, 19 Apr 2021 01:51:42 -0400 Subject: [PATCH] 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 --- spring-batch-docs/asciidoc/job.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-batch-docs/asciidoc/job.adoc b/spring-batch-docs/asciidoc/job.adoc index 8eba7a580..746f24bb0 100644 --- a/spring-batch-docs/asciidoc/job.adoc +++ b/spring-batch-docs/asciidoc/job.adoc @@ -449,8 +449,8 @@ example shows how to provide a custom transaction manager: [source, java] ---- @Bean -public BatchConfigurer batchConfigurer() { - return new DefaultBatchConfigurer() { +public BatchConfigurer batchConfigurer(DataSource dataSource) { + return new DefaultBatchConfigurer(dataSource) { @Override public PlatformTransactionManager getTransactionManager() { return new MyTransactionManager();