From a1ce07e106b43343df38a1f0a6b56a311199a023 Mon Sep 17 00:00:00 2001
From: Mahmoud Ben Hassine <mbenhassine@vmware.com>
Date: Thu, 25 Apr 2024 10:59:17 +0200
Subject: [PATCH] Fix code sample that uses deprecated StepBuilderFactory

Backported from b020da4766d306950cc6141a5eeb8fffcd60dd6b

Issue #4582
---
 spring-batch-docs/src/main/asciidoc/scalability.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spring-batch-docs/src/main/asciidoc/scalability.adoc b/spring-batch-docs/src/main/asciidoc/scalability.adoc
index fc7dfa5886..6d8928fa24 100644
--- a/spring-batch-docs/src/main/asciidoc/scalability.adoc
+++ b/spring-batch-docs/src/main/asciidoc/scalability.adoc
@@ -338,8 +338,8 @@ configuration:
 [source, java, role="javaContent"]
 ----
 @Bean
-public Step step1Manager() {
-    return stepBuilderFactory.get("step1.manager")
+public Step step1Manager(JobRepository jobRepository) {
+    return new StepBuilder("step1.manager", jobRepository)
         .<String, String>partitioner("step1", partitioner())
         .step(step1())
         .gridSize(10)