From 4c86f33da977fc48edadb79d526aecbd220f6585 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Thu, 22 May 2025 09:55:26 +0200 Subject: [PATCH] Add support to configure JobKeyGenerator in MongoJobRepository --- .../AbstractJobRepositoryFactoryBean.java | 17 ++++++++++ .../support/JdbcJobRepositoryFactoryBean.java | 31 ++++++------------- .../support/JobRepositoryFactoryBean.java | 16 ---------- .../MongoJobRepositoryFactoryBean.java | 4 ++- 4 files changed, 30 insertions(+), 38 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java index f8fd15860..3c23bf616 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java @@ -22,6 +22,8 @@ import org.aopalliance.intercept.MethodInterceptor; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.NameMatchMethodPointcut; +import org.springframework.batch.core.DefaultJobKeyGenerator; +import org.springframework.batch.core.JobKeyGenerator; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.dao.ExecutionContextDao; import org.springframework.batch.core.repository.dao.JobExecutionDao; @@ -71,6 +73,8 @@ public abstract class AbstractJobRepositoryFactoryBean implements FactoryBean