From 880779458ef43f7fbfc595d3560b14a7842f5890 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Thu, 22 May 2025 09:58:57 +0200 Subject: [PATCH] Override getJobInstanceCount in ResourcelessJobRepository --- .../core/repository/support/ResourcelessJobRepository.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/ResourcelessJobRepository.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/ResourcelessJobRepository.java index 9fb6b33dd..8eadd5b6c 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/ResourcelessJobRepository.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/ResourcelessJobRepository.java @@ -1,5 +1,5 @@ /* - * Copyright 2024 the original author or authors. + * Copyright 2024-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,6 +54,11 @@ public class ResourcelessJobRepository implements JobRepository { return false; } + @Override + public long getJobInstanceCount(String jobName) { + return 1; + } + @Override public JobInstance createJobInstance(String jobName, JobParameters jobParameters) { this.jobInstance = new JobInstance(1L, jobName);