diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java index 6d2f8ef25d..9629eb2374 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java @@ -227,7 +227,16 @@ public RemoteChunkingManagerStepBuilder reader(ItemReader rea return this; } + /** + * Set the job repository + * @param jobRepository the repository to set + * @return this to enable fluent chaining + * @deprecated use + * {@link RemoteChunkingManagerStepBuilder#RemoteChunkingManagerStepBuilder(String, JobRepository)} + */ @Override + @SuppressWarnings("removal") + @Deprecated(since = "5.1", forRemoval = true) public RemoteChunkingManagerStepBuilder repository(JobRepository jobRepository) { super.repository(jobRepository); return this; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java index 089f3eee80..9f1e95187c 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java @@ -242,7 +242,16 @@ private boolean isPolling() { return this.inputChannel == null; } + /** + * Set the job repository + * @param jobRepository the repository to set + * @return this to enable fluent chaining + * @deprecated use + * {@link RemotePartitioningManagerStepBuilder#RemotePartitioningManagerStepBuilder(String, JobRepository)} + */ @Override + @SuppressWarnings("removal") + @Deprecated(since = "5.1", forRemoval = true) public RemotePartitioningManagerStepBuilder repository(JobRepository jobRepository) { super.repository(jobRepository); return this; diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningWorkerStepBuilder.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningWorkerStepBuilder.java index 0b8e88967d..16fda82326 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningWorkerStepBuilder.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningWorkerStepBuilder.java @@ -157,7 +157,16 @@ public RemotePartitioningWorkerStepBuilder beanFactory(BeanFactory beanFactory) return this; } + /** + * Set the job repository + * @param jobRepository the repository to set + * @return this to enable fluent chaining + * @deprecated use + * {@link RemotePartitioningWorkerStepBuilder#RemotePartitioningWorkerStepBuilder(String, JobRepository)} + */ @Override + @SuppressWarnings("removal") + @Deprecated(since = "5.1", forRemoval = true) public RemotePartitioningWorkerStepBuilder repository(JobRepository jobRepository) { super.repository(jobRepository); return this; diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilderTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilderTests.java index 097083fa8b..bb531b8f2c 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilderTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilderTests.java @@ -190,7 +190,6 @@ void testUnsupportedOperationExceptionWhenSpecifyingAnItemWriter() { .reader(this.itemReader) .writer(items -> { }) - .repository(this.jobRepository) .transactionManager(this.transactionManager) .inputChannel(this.inputChannel) .outputChannel(this.outputChannel)