diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/BatchRegistrar.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/BatchRegistrar.java
index 3d23f6bcf..073ef836d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/BatchRegistrar.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/BatchRegistrar.java
@@ -111,11 +111,6 @@ class BatchRegistrar implements ImportBeanDefinitionRegistrar {
beanDefinitionBuilder.addPropertyReference("serializer", executionContextSerializerRef);
}
- String lobHandlerRef = batchAnnotation.lobHandlerRef();
- if (registry.containsBeanDefinition(lobHandlerRef)) {
- beanDefinitionBuilder.addPropertyReference("lobHandler", lobHandlerRef);
- }
-
String conversionServiceRef = batchAnnotation.conversionServiceRef();
if (registry.containsBeanDefinition(conversionServiceRef)) {
beanDefinitionBuilder.addPropertyReference("conversionService", conversionServiceRef);
@@ -178,11 +173,6 @@ class BatchRegistrar implements ImportBeanDefinitionRegistrar {
beanDefinitionBuilder.addPropertyReference("serializer", executionContextSerializerRef);
}
- String lobHandlerRef = batchAnnotation.lobHandlerRef();
- if (registry.containsBeanDefinition(lobHandlerRef)) {
- beanDefinitionBuilder.addPropertyReference("lobHandler", lobHandlerRef);
- }
-
String conversionServiceRef = batchAnnotation.conversionServiceRef();
if (registry.containsBeanDefinition(conversionServiceRef)) {
beanDefinitionBuilder.addPropertyReference("conversionService", conversionServiceRef);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java
index 27239d36c..6e2740079 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2024 the original author or authors.
+ * Copyright 2012-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.
@@ -238,14 +238,6 @@ public @interface EnableBatchProcessing {
*/
String jobKeyGeneratorRef() default "jobKeyGenerator";
- /**
- * The large object handler to use in job repository and job explorer.
- * @return the bean name of the lob handler to use. Defaults to {@literal lobHandler}.
- * @deprecated Since 5.2 with no replacement. Scheduled for removal in v6
- */
- @Deprecated(since = "5.2.0", forRemoval = true)
- String lobHandlerRef() default "lobHandler";
-
/**
* The type of large objects.
* @return the type of large objects.
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.java
index 67df9fd41..484809fb2 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultBatchConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2024 the original author or authors.
+ * Copyright 2012-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.
@@ -67,8 +67,6 @@ import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.MetaDataAccessException;
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
-import org.springframework.jdbc.support.lob.DefaultLobHandler;
-import org.springframework.jdbc.support.lob.LobHandler;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.Isolation;
@@ -85,7 +83,8 @@ import org.springframework.transaction.annotation.Isolation;
*
a {@link JobLauncher} named "jobLauncher"
*
a {@link JobRegistry} named "jobRegistry"
*
a {@link JobOperator} named "JobOperator"
- *
a {@link JobRegistryBeanPostProcessor} named "jobRegistryBeanPostProcessor"
+ *
a {@link JobRegistrySmartInitializingSingleton} named
+ * "jobRegistrySmartInitializingSingleton"
*
a {@link org.springframework.batch.core.scope.StepScope} named "stepScope"
*
a {@link org.springframework.batch.core.scope.JobScope} named "jobScope"
*
@@ -137,7 +136,6 @@ public class DefaultBatchConfiguration implements ApplicationContextAware {
jobRepositoryFactoryBean.setSerializer(getExecutionContextSerializer());
jobRepositoryFactoryBean.setConversionService(getConversionService());
jobRepositoryFactoryBean.setJdbcOperations(getJdbcOperations());
- jobRepositoryFactoryBean.setLobHandler(getLobHandler());
jobRepositoryFactoryBean.setCharset(getCharset());
jobRepositoryFactoryBean.setMaxVarCharLength(getMaxVarCharLength());
jobRepositoryFactoryBean.setIsolationLevelForCreateEnum(getIsolationLevelForCreate());
@@ -150,17 +148,6 @@ public class DefaultBatchConfiguration implements ApplicationContextAware {
}
}
- /**
- * Define a job launcher.
- * @return a job launcher
- * @throws BatchConfigurationException if unable to configure the default job launcher
- * @deprecated Since 5.2. Use {@link #jobLauncher(JobRepository)} instead
- */
- @Deprecated(forRemoval = true)
- public JobLauncher jobLauncher() throws BatchConfigurationException {
- return jobLauncher(jobRepository());
- }
-
/**
* Define a job launcher bean.
* @param jobRepository the job repository
@@ -191,7 +178,6 @@ public class DefaultBatchConfiguration implements ApplicationContextAware {
jobExplorerFactoryBean.setJobKeyGenerator(getJobKeyGenerator());
jobExplorerFactoryBean.setCharset(getCharset());
jobExplorerFactoryBean.setTablePrefix(getTablePrefix());
- jobExplorerFactoryBean.setLobHandler(getLobHandler());
jobExplorerFactoryBean.setConversionService(getConversionService());
jobExplorerFactoryBean.setSerializer(getExecutionContextSerializer());
try {
@@ -208,18 +194,6 @@ public class DefaultBatchConfiguration implements ApplicationContextAware {
return new MapJobRegistry();
}
- /**
- * Define a job operator.
- * @return a job operator
- * @throws BatchConfigurationException if unable to configure the default job operator
- * @deprecated Since 5.2. Use
- * {@link #jobOperator(JobRepository, JobExplorer, JobRegistry, JobLauncher)} instead
- */
- @Deprecated(forRemoval = true)
- public JobOperator jobOperator() throws BatchConfigurationException {
- return jobOperator(jobRepository(), jobExplorer(), jobRegistry(), jobLauncher());
- }
-
/**
* Define a job operator bean.
* @param jobRepository a job repository
@@ -249,26 +223,6 @@ public class DefaultBatchConfiguration implements ApplicationContextAware {
}
}
- /**
- * Defines a {@link JobRegistryBeanPostProcessor}.
- * @return a {@link JobRegistryBeanPostProcessor}
- * @throws BatchConfigurationException if unable to register the bean
- * @since 5.1
- * @deprecated Use {@link #jobRegistrySmartInitializingSingleton(JobRegistry)} instead
- */
- @Deprecated(forRemoval = true)
- public JobRegistryBeanPostProcessor jobRegistryBeanPostProcessor() throws BatchConfigurationException {
- JobRegistryBeanPostProcessor jobRegistryBeanPostProcessor = new JobRegistryBeanPostProcessor();
- jobRegistryBeanPostProcessor.setJobRegistry(jobRegistry());
- try {
- jobRegistryBeanPostProcessor.afterPropertiesSet();
- return jobRegistryBeanPostProcessor;
- }
- catch (Exception e) {
- throw new BatchConfigurationException("Unable to configure the default job registry BeanPostProcessor", e);
- }
- }
-
/**
* Define a {@link JobRegistrySmartInitializingSingleton} bean.
* @param jobRegistry the job registry to populate
@@ -388,17 +342,6 @@ public class DefaultBatchConfiguration implements ApplicationContextAware {
return StandardCharsets.UTF_8;
}
- /**
- * A special handler for large objects. The default is usually fine, except for some
- * (usually older) versions of Oracle.
- * @return the {@link LobHandler} to use
- * @deprecated Since 5.2 with no replacement. Scheduled for removal in v6
- */
- @Deprecated(since = "5.2.0", forRemoval = true)
- protected LobHandler getLobHandler() {
- return new DefaultLobHandler();
- }
-
/**
* Return the {@link JdbcOperations}. If this property is not overridden, a new
* {@link JdbcTemplate} will be created for the configured data source by default.
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java
deleted file mode 100644
index 1f6ba7acf..000000000
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright 2006-2024 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.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.batch.core.configuration.support;
-
-import java.util.Collection;
-import java.util.HashSet;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.batch.core.Job;
-import org.springframework.batch.core.configuration.DuplicateJobException;
-import org.springframework.batch.core.configuration.JobLocator;
-import org.springframework.batch.core.configuration.JobRegistry;
-import org.springframework.beans.BeansException;
-import org.springframework.beans.FatalBeanException;
-import org.springframework.beans.factory.BeanFactory;
-import org.springframework.beans.factory.BeanFactoryAware;
-import org.springframework.beans.factory.DisposableBean;
-import org.springframework.beans.factory.InitializingBean;
-import org.springframework.beans.factory.config.BeanDefinition;
-import org.springframework.beans.factory.config.BeanPostProcessor;
-import org.springframework.beans.factory.support.DefaultListableBeanFactory;
-import org.springframework.util.Assert;
-
-/**
- * A {@link BeanPostProcessor} that registers {@link Job} beans with a
- * {@link JobRegistry}. Include a bean of this type along with your job configuration and
- * use the same {@link JobRegistry} as a {@link JobLocator} when you need to locate a
- * {@link Job} to launch.
- *
- * An alternative to this class is {@link JobRegistrySmartInitializingSingleton}, which is
- * recommended in cases where this class may cause early bean initializations. You must
- * include at most one of either of them as a bean.
- *
- * @deprecated since 5.2 in favor of {@link JobRegistrySmartInitializingSingleton}.
- * @author Dave Syer
- * @author Mahmoud Ben Hassine
- *
- */
-@Deprecated(since = "5.2")
-public class JobRegistryBeanPostProcessor
- implements BeanPostProcessor, BeanFactoryAware, InitializingBean, DisposableBean {
-
- private static final Log logger = LogFactory.getLog(JobRegistryBeanPostProcessor.class);
-
- // It doesn't make sense for this to have a default value...
- private JobRegistry jobRegistry = null;
-
- private final Collection jobNames = new HashSet<>();
-
- private String groupName = null;
-
- private DefaultListableBeanFactory beanFactory;
-
- /**
- * The group name for jobs registered by this component. Optional (defaults to null,
- * which means that jobs are registered with their bean names). Useful where there is
- * a hierarchy of application contexts all contributing to the same
- * {@link JobRegistry}: child contexts can then define an instance with a unique group
- * name to avoid clashes between job names.
- * @param groupName the groupName to set
- */
- public void setGroupName(String groupName) {
- this.groupName = groupName;
- }
-
- /**
- * Injection setter for {@link JobRegistry}.
- * @param jobRegistry the jobConfigurationRegistry to set
- */
- public void setJobRegistry(JobRegistry jobRegistry) {
- this.jobRegistry = jobRegistry;
- }
-
- @Override
- public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
- if (beanFactory instanceof DefaultListableBeanFactory) {
- this.beanFactory = (DefaultListableBeanFactory) beanFactory;
- }
- }
-
- /**
- * Make sure the registry is set before use.
- *
- * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
- */
- @Override
- public void afterPropertiesSet() throws Exception {
- Assert.state(jobRegistry != null, "JobRegistry must not be null");
- }
-
- /**
- * Unregister all the {@link Job} instances that were registered by this post
- * processor.
- * @see org.springframework.beans.factory.DisposableBean#destroy()
- */
- @Override
- public void destroy() throws Exception {
- for (String name : jobNames) {
- if (logger.isDebugEnabled()) {
- logger.debug("Unregistering job: " + name);
- }
- jobRegistry.unregister(name);
- }
- jobNames.clear();
- }
-
- /**
- * If the bean is an instance of {@link Job}, then register it.
- * @throws FatalBeanException if there is a {@link DuplicateJobException}.
- *
- * @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(java.lang.Object,
- * java.lang.String)
- */
- @Override
- public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
- if (bean instanceof Job job) {
- try {
- String groupName = this.groupName;
- if (beanFactory != null && beanFactory.containsBean(beanName)) {
- groupName = getGroupName(beanFactory.getBeanDefinition(beanName), job);
- }
- job = groupName == null ? job : new GroupAwareJob(groupName, job);
- ReferenceJobFactory jobFactory = new ReferenceJobFactory(job);
- String name = jobFactory.getJobName();
- if (logger.isDebugEnabled()) {
- logger.debug("Registering job: " + name);
- }
- jobRegistry.register(jobFactory);
- jobNames.add(name);
- }
- catch (DuplicateJobException e) {
- throw new FatalBeanException("Cannot register job configuration", e);
- }
- return job;
- }
- return bean;
- }
-
- /**
- * Determine a group name for the job to be registered. The default implementation
- * returns the {@link #setGroupName(String) groupName} configured. Provides an
- * extension point for specialised subclasses.
- * @param beanDefinition the bean definition for the job
- * @param job the job
- * @return a group name for the job (or null if not needed)
- */
- protected String getGroupName(BeanDefinition beanDefinition, Job job) {
- return groupName;
- }
-
- /**
- * Do nothing.
- *
- * @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessBeforeInitialization(java.lang.Object,
- * java.lang.String)
- */
- @Override
- public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
- return bean;
- }
-
-}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistrySmartInitializingSingleton.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistrySmartInitializingSingleton.java
index ede418cf2..bd6f5b9a4 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistrySmartInitializingSingleton.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistrySmartInitializingSingleton.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.
@@ -42,9 +42,6 @@ import org.springframework.util.Assert;
* {@link JobRegistry}. Include a bean of this type along with your job configuration and
* use the same {@link JobRegistry} as a {@link JobLocator} when you need to locate a
* {@link Job} to launch.
- *
- * This class is an alternative to {@link JobRegistryBeanPostProcessor} and prevents early
- * bean initializations. You must include at most one of either of them as a bean.
*
* @author Henning Pƶttker
* @since 5.1.1
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java
index be8808756..bbe403a11 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2022 the original author or authors.
+ * Copyright 2006-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.
@@ -77,8 +77,6 @@ public class JobRepositoryParser extends AbstractSingleBeanDefinitionParser {
String maxVarCharLength = element.getAttribute("max-varchar-length");
- String lobHandler = element.getAttribute("lob-handler");
-
String serializer = element.getAttribute("serializer");
String conversionService = element.getAttribute("conversion-service");
@@ -97,9 +95,6 @@ public class JobRepositoryParser extends AbstractSingleBeanDefinitionParser {
if (StringUtils.hasText(tablePrefix)) {
builder.addPropertyValue("tablePrefix", tablePrefix);
}
- if (StringUtils.hasText(lobHandler)) {
- builder.addPropertyReference("lobHandler", lobHandler);
- }
if (StringUtils.hasText(maxVarCharLength)) {
builder.addPropertyValue("maxVarCharLength", maxVarCharLength);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java
index 7b18458ee..187bda9a3 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -185,8 +185,6 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN
private TaskExecutor taskExecutor;
- private Integer throttleLimit;
-
private ItemReader extends I> itemReader;
private ItemProcessor super I, ? extends O> itemProcessor;
@@ -473,9 +471,6 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN
}
builder.taskExecutor(taskExecutor);
- if (throttleLimit != null) {
- builder.throttleLimit(throttleLimit);
- }
builder.transactionManager(transactionManager);
if (transactionTimeout != null || propagation != null || isolation != null
|| noRollbackExceptionClasses != null) {
@@ -992,19 +987,6 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN
this.taskExecutor = taskExecutor;
}
- /**
- * Public setter for the throttle limit. This limits the number of tasks queued for
- * concurrent processing to prevent thread pools from being overwhelmed. Defaults to
- * {@link TaskExecutorRepeatTemplate#DEFAULT_THROTTLE_LIMIT}.
- * @param throttleLimit The throttle limit to set.
- * @deprecated since 5.0, scheduled for removal in 6.0. This API is not intended for
- * end users anyway. It is only used by the XML namespace parser.
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public void setThrottleLimit(Integer throttleLimit) {
- this.throttleLimit = throttleLimit;
- }
-
/**
* @param itemReader The {@link ItemReader} to set.
*/
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java
index 9d3e24dae..49f5661e6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2024 the original author or authors.
+ * Copyright 2002-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.
@@ -51,7 +51,6 @@ import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer;
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
-import org.springframework.jdbc.support.lob.LobHandler;
import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
@@ -81,8 +80,6 @@ public class JobExplorerFactoryBean extends AbstractJobExplorerFactoryBean imple
private JobKeyGenerator jobKeyGenerator;
- private LobHandler lobHandler;
-
private ExecutionContextSerializer serializer;
private Charset charset = StandardCharsets.UTF_8;
@@ -138,18 +135,6 @@ public class JobExplorerFactoryBean extends AbstractJobExplorerFactoryBean imple
this.jobKeyGenerator = jobKeyGenerator;
}
- /**
- * The lob handler to use when saving {@link ExecutionContext} instances. Defaults to
- * {@code null}, which works for most databases.
- * @param lobHandler Large object handler for saving an
- * {@link org.springframework.batch.item.ExecutionContext}.
- * @deprecated Since 5.2 with no replacement. Scheduled for removal in v6
- */
- @Deprecated(since = "5.2.0", forRemoval = true)
- public void setLobHandler(LobHandler lobHandler) {
- this.lobHandler = lobHandler;
- }
-
/**
* Sets the {@link Charset} to use when deserializing the execution context. Defaults
* to "UTF-8". Must not be {@code null}.
@@ -210,7 +195,6 @@ public class JobExplorerFactoryBean extends AbstractJobExplorerFactoryBean imple
protected ExecutionContextDao createExecutionContextDao() throws Exception {
JdbcExecutionContextDao dao = new JdbcExecutionContextDao();
dao.setJdbcTemplate(jdbcOperations);
- dao.setLobHandler(lobHandler);
dao.setTablePrefix(tablePrefix);
dao.setSerializer(serializer);
dao.setCharset(charset);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilder.java
index 6ea482318..85f44a1a3 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilder.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -30,16 +30,6 @@ import org.springframework.batch.core.repository.JobRepository;
*/
public class JobBuilder extends JobBuilderHelper {
- /**
- * Create a new builder for a job with the given name.
- * @param name the name of the job
- * @deprecated use {@link JobBuilder#JobBuilder(String, JobRepository)}
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public JobBuilder(String name) {
- super(name);
- }
-
/**
* Create a new builder for a job with the given name.
* @param name the name of the job
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilderHelper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilderHelper.java
index cacf2eab6..dee585863 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilderHelper.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobBuilderHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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,17 +54,6 @@ public abstract class JobBuilderHelper> {
private final CommonJobProperties properties;
- /**
- * Create a new {@link JobBuilderHelper}.
- * @param name the job name
- * @deprecated use {@link JobBuilderHelper#JobBuilderHelper(String, JobRepository)}
- */
- @Deprecated(since = "5.1", forRemoval = true)
- public JobBuilderHelper(String name) {
- this.properties = new CommonJobProperties();
- properties.name = name;
- }
-
/**
* Create a new {@link JobBuilderHelper}.
* @param name the job name
@@ -110,20 +99,6 @@ public abstract class JobBuilderHelper> {
return result;
}
- /**
- * Sets the job repository for the job.
- * @param jobRepository the job repository (mandatory)
- * @return this to enable fluent chaining
- * @deprecated use {@link JobBuilderHelper#JobBuilderHelper(String, JobRepository)}
- */
- @Deprecated(since = "5.1", forRemoval = true)
- public B repository(JobRepository jobRepository) {
- properties.jobRepository = jobRepository;
- @SuppressWarnings("unchecked")
- B result = (B) this;
- return result;
- }
-
/**
* Sets the job observation convention.
* @param observationConvention the job observation convention (optional)
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java
deleted file mode 100644
index 79d742240..000000000
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2006-2023 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.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.batch.core.listener;
-
-import org.springframework.batch.core.ChunkListener;
-import org.springframework.batch.core.scope.context.ChunkContext;
-
-/**
- * Basic support implementation of {@link ChunkListener}
- *
- * @author Lucas Ward
- * @author Michael Minella
- * @deprecated as of 5.0, in favor of the default methods on the {@link ChunkListener}
- */
-@Deprecated
-public class ChunkListenerSupport implements ChunkListener {
-
- @Override
- public void afterChunk(ChunkContext context) {
- }
-
- @Override
- public void beforeChunk(ChunkContext context) {
- }
-
- @Override
- public void afterChunkError(ChunkContext context) {
- }
-
-}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java
deleted file mode 100644
index fe54e5a6b..000000000
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2006-2023 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.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.batch.core.listener;
-
-import org.springframework.batch.core.JobExecution;
-import org.springframework.batch.core.JobExecutionListener;
-
-/**
- * @author Dave Syer
- * @deprecated as of 5.0, in favor of the default methods on the
- * {@link JobExecutionListener}
- */
-@Deprecated
-public class JobExecutionListenerSupport implements JobExecutionListener {
-
- @Override
- public void afterJob(JobExecution jobExecution) {
- }
-
- @Override
- public void beforeJob(JobExecution jobExecution) {
- }
-
-}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java
deleted file mode 100644
index 00001e2ee..000000000
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2006-2023 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.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.batch.core.listener;
-
-import org.springframework.batch.core.SkipListener;
-
-/**
- * Basic no-op implementations of all {@link SkipListener} implementations.
- *
- * @author Dave Syer
- * @author Mahmoud Ben Hassine
- * @deprecated as of v5.0 in favor of the default methods in {@link SkipListener}.
- *
- */
-@Deprecated
-public class SkipListenerSupport implements SkipListener {
-
- @Override
- public void onSkipInRead(Throwable t) {
- }
-
- @Override
- public void onSkipInWrite(S item, Throwable t) {
- }
-
- @Override
- public void onSkipInProcess(T item, Throwable t) {
- }
-
-}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java
deleted file mode 100644
index bd4bedb07..000000000
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2006-2023 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.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.batch.core.listener;
-
-import org.springframework.batch.core.ExitStatus;
-import org.springframework.batch.core.StepExecution;
-import org.springframework.batch.core.StepExecutionListener;
-import org.springframework.lang.Nullable;
-
-/**
- * @author Dave Syer
- * @deprecated as of 5.0, in favor of the default methods on the
- * {@link StepExecutionListener}
- */
-@Deprecated
-public class StepExecutionListenerSupport implements StepExecutionListener {
-
- @Nullable
- @Override
- public ExitStatus afterStep(StepExecution stepExecution) {
- return null;
- }
-
- @Override
- public void beforeStep(StepExecution stepExecution) {
- }
-
-}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java
index 07915965c..47b8b40c1 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2024 the original author or authors.
+ * Copyright 2006-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.
@@ -40,8 +40,6 @@ import org.springframework.batch.item.ExecutionContext;
import org.springframework.core.serializer.Serializer;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.RowMapper;
-import org.springframework.jdbc.support.lob.DefaultLobHandler;
-import org.springframework.jdbc.support.lob.LobHandler;
import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
@@ -110,8 +108,6 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
private int shortContextLength = DEFAULT_MAX_VARCHAR_LENGTH;
- private LobHandler lobHandler = new DefaultLobHandler();
-
private ExecutionContextSerializer serializer = new DefaultExecutionContextSerializer();
private final Lock lock = new ReentrantLock();
@@ -268,15 +264,6 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
getJdbcTemplate().update(getQuery(DELETE_STEP_EXECUTION_CONTEXT), stepExecution.getId());
}
- /**
- * @deprecated Since 5.2 with no replacement. Scheduled for removal in v6
- * @param lobHandler the lob handler to use
- */
- @Deprecated(since = "5.2.0", forRemoval = true)
- public void setLobHandler(LobHandler lobHandler) {
- this.lobHandler = lobHandler;
- }
-
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
@@ -306,7 +293,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
getJdbcTemplate().update(getQuery(sql), ps -> {
ps.setString(1, shortContext);
if (longContext != null) {
- lobHandler.getLobCreator().setClobAsString(ps, 2, longContext);
+ ps.setString(2, longContext);
}
else {
ps.setNull(2, getClobTypeToUse());
@@ -342,7 +329,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
}
ps.setString(1, shortContext);
if (longContext != null) {
- lobHandler.getLobCreator().setClobAsString(ps, 2, longContext);
+ ps.setString(2, longContext);
}
else {
ps.setNull(2, getClobTypeToUse());
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java
index 27dcc8b7a..8b503899a 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -284,17 +284,6 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
getJdbcTemplate().update(getQuery(DELETE_JOB_INSTANCE), jobInstance.getId());
}
- /**
- * Setter for {@link DataFieldMaxValueIncrementer} to be used when generating primary
- * keys for {@link JobInstance} instances.
- * @param jobIncrementer the {@link DataFieldMaxValueIncrementer}
- * @deprecated as of v5.0 in favor of using the {@link #setJobInstanceIncrementer}
- */
- @Deprecated
- public void setJobIncrementer(DataFieldMaxValueIncrementer jobIncrementer) {
- this.setJobInstanceIncrementer(jobIncrementer);
- }
-
/**
* Setter for {@link DataFieldMaxValueIncrementer} to be used when generating primary
* keys for {@link JobInstance} instances.
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/JobRepositoryFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/JobRepositoryFactoryBean.java
index 70b0b5443..ac2bd74b6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/JobRepositoryFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/JobRepositoryFactoryBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2024 the original author or authors.
+ * Copyright 2002-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.
@@ -56,8 +56,6 @@ import org.springframework.core.convert.support.ConfigurableConversionService;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.jdbc.support.lob.DefaultLobHandler;
-import org.springframework.jdbc.support.lob.LobHandler;
import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@@ -95,8 +93,6 @@ public class JobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean i
private int maxVarCharLengthForShortContext = AbstractJdbcBatchMetadataDao.DEFAULT_SHORT_CONTEXT_LENGTH;
- private LobHandler lobHandler;
-
private ExecutionContextSerializer serializer;
private Integer clobType;
@@ -124,19 +120,6 @@ public class JobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean i
this.serializer = serializer;
}
- /**
- * A special handler for large objects. The default is usually fine, except for some
- * (usually older) versions of Oracle. The default is determined from the data base
- * type.
- * @param lobHandler the {@link LobHandler} to set
- * @deprecated Since 5.2 with no replacement. Scheduled for removal in v6
- * @see LobHandler
- */
- @Deprecated(since = "5.2.0", forRemoval = true)
- public void setLobHandler(LobHandler lobHandler) {
- this.lobHandler = lobHandler;
- }
-
/**
* Public setter for the length of long string columns in database. Do not set this if
* you haven't modified the schema. Note this value will be used for the exit message
@@ -276,10 +259,6 @@ public class JobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean i
}
}
- if (lobHandler == null && databaseType.equalsIgnoreCase(DatabaseType.ORACLE.toString())) {
- lobHandler = new DefaultLobHandler();
- }
-
if (serializer == null) {
serializer = new DefaultExecutionContextSerializer();
}
@@ -355,10 +334,6 @@ public class JobRepositoryFactoryBean extends AbstractJobRepositoryFactoryBean i
dao.setSerializer(serializer);
dao.setCharset(charset);
- if (lobHandler != null) {
- dao.setLobHandler(lobHandler);
- }
-
dao.afterPropertiesSet();
dao.setShortContextLength(this.maxVarCharLengthForShortContext);
return dao;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/AbstractTaskletStepBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/AbstractTaskletStepBuilder.java
index 55e6a0fdc..3a5eb7ab0 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/AbstractTaskletStepBuilder.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/AbstractTaskletStepBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2024 the original author or authors.
+ * Copyright 2012-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.
@@ -67,8 +67,6 @@ public abstract class AbstractTaskletStepBuilder parent) {
@@ -88,7 +86,6 @@ public abstract class AbstractTaskletStepBuilder {
- /**
- * Initialize a step builder for a step with the given name.
- * @param name the name of the step
- * @deprecated use {@link StepBuilder#StepBuilder(String, JobRepository)}
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public StepBuilder(String name) {
- super(name);
- }
-
/**
* Initialize a step builder for a step with the given name and job repository.
* @param name the name of the step
@@ -54,17 +44,6 @@ public class StepBuilder extends StepBuilderHelper {
super(name, jobRepository);
}
- /**
- * Build a step with a custom tasklet, not necessarily item processing.
- * @param tasklet a tasklet
- * @return a {@link TaskletStepBuilder}
- * @deprecated use {@link StepBuilder#tasklet(Tasklet, PlatformTransactionManager)}
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public TaskletStepBuilder tasklet(Tasklet tasklet) {
- return new TaskletStepBuilder(this).tasklet(tasklet);
- }
-
/**
* Build a step with a custom tasklet, not necessarily item processing.
* @param tasklet a tasklet
@@ -76,27 +55,6 @@ public class StepBuilder extends StepBuilderHelper {
return new TaskletStepBuilder(this).tasklet(tasklet, transactionManager);
}
- /**
- * Build a step that processes items in chunks with the size provided. To extend the
- * step to being fault tolerant, call the {@link SimpleStepBuilder#faultTolerant()}
- * method on the builder. In most cases you will want to parameterize your call to
- * this method, to preserve the type safety of your readers and writers, e.g.
- *
- *
- * new StepBuilder("step1").<Order, Ledger> chunk(100).reader(new OrderReader()).writer(new LedgerWriter())
- * // ... etc.
- *
- * @param chunkSize the chunk size (commit interval)
- * @return a {@link SimpleStepBuilder}
- * @param the type of item to be processed as input
- * @param the type of item to be output
- * @deprecated use {@link StepBuilder#chunk(int, PlatformTransactionManager)}
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public SimpleStepBuilder chunk(int chunkSize) {
- return new SimpleStepBuilder(this).chunk(chunkSize);
- }
-
/**
* Build a step that processes items in chunks with the size provided. To extend the
* step to being fault tolerant, call the {@link SimpleStepBuilder#faultTolerant()}
@@ -119,29 +77,6 @@ public class StepBuilder extends StepBuilderHelper {
return new SimpleStepBuilder(this).transactionManager(transactionManager).chunk(chunkSize);
}
- /**
- * Build a step that processes items in chunks with the completion policy provided. To
- * extend the step to being fault tolerant, call the
- * {@link SimpleStepBuilder#faultTolerant()} method on the builder. In most cases you
- * will want to parameterize your call to this method, to preserve the type safety of
- * your readers and writers, e.g.
- *
- *
- * new StepBuilder("step1").<Order, Ledger> chunk(100).reader(new OrderReader()).writer(new LedgerWriter())
- * // ... etc.
- *
- * @param completionPolicy the completion policy to use to control chunk processing
- * @return a {@link SimpleStepBuilder}
- * @param the type of item to be processed as input
- * @param the type of item to be output
- * @deprecated use
- * {@link StepBuilder#chunk(CompletionPolicy, PlatformTransactionManager)}
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public SimpleStepBuilder chunk(CompletionPolicy completionPolicy) {
- return new SimpleStepBuilder(this).chunk(completionPolicy);
- }
-
/**
* Build a step that processes items in chunks with the completion policy provided. To
* extend the step to being fault tolerant, call the
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/StepBuilderHelper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/StepBuilderHelper.java
index 577f383e0..802325a30 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/StepBuilderHelper.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/StepBuilderHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -53,17 +53,6 @@ public abstract class StepBuilderHelper> {
protected final CommonStepProperties properties;
- /**
- * Create a new {@link StepBuilderHelper}.
- * @param name the step name
- * @deprecated use {@link StepBuilderHelper#StepBuilderHelper(String, JobRepository)}
- */
- @Deprecated(since = "5.1", forRemoval = true)
- public StepBuilderHelper(String name) {
- this.properties = new CommonStepProperties();
- properties.name = name;
- }
-
/**
* Create a new {@link StepBuilderHelper}.
* @param name the step name
@@ -85,18 +74,6 @@ public abstract class StepBuilderHelper> {
this.properties = new CommonStepProperties(parent.properties);
}
- /**
- * Set the job repository
- * @param jobRepository the repository to set
- * @return this to enable fluent chaining
- * @deprecated use {@link StepBuilderHelper#StepBuilderHelper(String, JobRepository)}
- */
- @Deprecated(since = "5.1", forRemoval = true)
- public B repository(JobRepository jobRepository) {
- properties.jobRepository = jobRepository;
- return self();
- }
-
/**
* Sets the step observation convention.
* @param observationConvention the step observation convention (optional)
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/TaskletStepBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/TaskletStepBuilder.java
index bf4aad229..896fce2ce 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/TaskletStepBuilder.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/TaskletStepBuilder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -38,18 +38,6 @@ public class TaskletStepBuilder extends AbstractTaskletStepBuilder implements FactoryBean, BeanNameA
return taskExecutor;
}
- /**
- * Public setter for the throttle limit. This limits the number of tasks queued for
- * concurrent processing to prevent thread pools from being overwhelmed. Defaults to
- * {@link TaskExecutorRepeatTemplate#DEFAULT_THROTTLE_LIMIT}.
- * @param throttleLimit the throttle limit to set.
- * @deprecated since 5.0, scheduled for removal in 6.0. Use a pooled
- * {@link TaskExecutor} implementation with a limited capacity of its task queue
- * instead.
- */
- @Deprecated(since = "5.0", forRemoval = true)
- public void setThrottleLimit(int throttleLimit) {
- this.throttleLimit = throttleLimit;
- }
-
protected void applyConfiguration(SimpleStepBuilder builder) {
builder.reader(itemReader);
@@ -482,7 +468,6 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameA
}
builder.transactionManager(transactionManager);
builder.transactionAttribute(getTransactionAttribute());
- builder.repository(jobRepository);
builder.observationRegistry(observationRegistry);
builder.startLimit(startLimit);
builder.allowStartIfComplete(allowStartIfComplete);
@@ -491,7 +476,6 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameA
builder.chunkOperations(chunkOperations);
builder.stepOperations(stepOperations);
builder.taskExecutor(taskExecutor);
- builder.throttleLimit(throttleLimit);
builder.exceptionHandler(exceptionHandler);
if (isReaderTransactionalQueue) {
builder.readerIsTransactionalQueue();
diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-5.0.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-5.0.xsd
new file mode 100644
index 000000000..1c5b20f37
--- /dev/null
+++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-5.0.xsd
@@ -0,0 +1,1368 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines a job composed of a set of steps and
+ transitions between steps. The job will be exposed in
+ the enclosing
+ bean factory as a component of type Job
+ that can be launched using a
+ JobLauncher.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines a stage in job processing backed by a
+ Step. The id attribute must be specified since this
+ step definition
+ will be referred to from other elements
+ to form a Job flow.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines a flow composed of a set of steps and
+ transitions between steps.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A reference to a JobExecutionListener (or a POJO
+ if using before-job-method / after-job-method or
+ source level
+ annotations).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A bean definition for a step listener (or POJO if
+ using *-method attributes or source level
+ annotations)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines a stage in job processing backed by a
+ Step. The id attribute must be specified. The
+ step
+ requires either
+ a chunk definition,
+ a tasklet reference, or a reference to a
+ (possibly abstract) parent step.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Declares job should split here into two or more
+ subflows.
+
+
+
+
+
+
+
+ A subflow within a job, having the same
+ format as a job, but without a separate identity.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Declares job should include an externalized flow
+ here.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Declares job should query a decider to determine
+ where execution should go next.
+
+
+
+
+
+
+
+
+ The decider is a reference to a
+ JobExecutionDecider that can produce a status to base
+ the next
+ transition on.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The tasklet is a reference to another bean
+ definition that implements
+ the Tasklet interface.
+
+
+
+
+
+
+
+
+
+ If the tasklet is specified as a bean definition, then a method can be specified and a POJO
+ will
+ be adapted to the Tasklet interface. The method suggested should have the same arguments
+ as Tasklet.execute (or a subset), and have a compatible return type (boolean, void or RepeatStatus).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ An exception class name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Classify an exception as "included" in the set. Exceptions of this type or a subclass are
+ included.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Classify an exception as "excluded" from the
+ set. Exceptions of this type or a subclass are
+ excluded
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A reference to a listener, a POJO with a
+ listener-annotated method, or a POJO with
+ a method
+ referenced by a
+ *-method attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Defines a transition from this step to the
+ next
+ one depending on the value of the exit
+ status.
+
+
+
+
+
+ A pattern to match against the exit status
+ code. Use * and ? as wildcard characters. When a
+ step finishes
+ the most
+ specific match will be chosen to select the next step.
+ Hint:
+ always include a default
+ transition with on="*".
+
+
+
+
+
+
+ The name of the step to go to next. Must
+ resolve to one of the other steps in this job.
+
+
+
+
+
+
+
+
+ Declares job should be stop at this point and
+ provides pointer where execution should continue
+ when
+ the job is
+ restarted.
+
+
+
+
+
+ A pattern to match against the exit status
+ code. Use * and ? as wildcard characters.
+ When a step
+ finishes
+ the most specific match will be chosen to
+ select the next step.
+
+
+
+
+
+ The name of the step to start on when the
+ stopped job is restarted.
+ Must resolve to one of the
+ other steps
+ in this job.
+
+
+
+
+
+ The exit code value to end on, defaults to
+ STOPPED.
+
+
+
+
+
+
+
+ Declares job should end at this point, without
+ the possibility of restart.
+ BatchStatus will be
+ COMPLETED.
+ ExitStatus is configurable.
+
+
+
+
+
+ A pattern to match against the exit status
+ code. Use * and ? as wildcard characters.
+ When a step
+ finishes
+ the most specific match will be chosen to
+ select the next step.
+
+
+
+
+
+ The exit code value to end on, defaults to
+ COMPLETED.
+
+
+
+
+
+
+
+ Declares job should fail at this point.
+ BatchStatus will be FAILED. ExitStatus is configurable.
+
+
+
+
+
+ A pattern to match against the exit status
+ code. Use * and ? as wildcard characters.
+ When a step
+ finishes
+ the most specific match will be chosen to
+ select the next step.
+
+
+
+
+
+ The exit code value to end on, defaults to
+ FAILED.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The name of the parent bean from which the
+ configuration should inherit.
+
+
+
+
+
+
+
+
+
+
+
+
+ Is this bean "abstract", that is, not meant to be
+ instantiated itself
+ but rather just serving as
+ parent for concrete
+ child bean definitions?
+ The default is "false". Specify "true" to
+ tell the bean factory to not
+ try
+ to instantiate that particular bean
+ in any case.
+
+ Note: This attribute will not be inherited by child
+ bean definitions.
+ Hence, it needs to be specified per abstract bean
+ definition.
+
+
+
+
+
+
+
+
+
+ Should this list be merged with the corresponding
+ list provided
+ by the parent? If not, it will
+ overwrite the parent
+ list.
+
+
+
+
+
+
+
+
+
+ This attribute indicates the method from the
+ class that should
+ be used to dynamically create a
+ proxy.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd
index 1c5b20f37..7656c4585 100644
--- a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd
+++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd
@@ -6,7 +6,7 @@
xsi:schemaLocation="
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tool https://www.springframework.org/schema/tool/spring-tool.xsd"
- version="5.0">
+ version="6.0">
@@ -265,20 +265,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessorTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessorTests.java
deleted file mode 100644
index a7913ed0b..000000000
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessorTests.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2006-2023 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.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.batch.core.configuration.support;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.util.Collection;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.batch.core.configuration.DuplicateJobException;
-import org.springframework.batch.core.job.JobSupport;
-import org.springframework.beans.FatalBeanException;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-/**
- * @author Dave Syer
- * @author Mahmoud Ben Hassine
- *
- */
-class JobRegistryBeanPostProcessorTests {
-
- private final JobRegistryBeanPostProcessor processor = new JobRegistryBeanPostProcessor();
-
- @Test
- void testInitializationFails() {
- Exception exception = assertThrows(IllegalStateException.class, processor::afterPropertiesSet);
- assertTrue(exception.getMessage().contains("JobRegistry"));
- }
-
- @Test
- void testBeforeInitialization() {
- // should be a no-op
- assertEquals("foo", processor.postProcessBeforeInitialization("foo", "bar"));
- }
-
- @Test
- void testAfterInitializationWithWrongType() {
- // should be a no-op
- assertEquals("foo", processor.postProcessAfterInitialization("foo", "bar"));
- }
-
- @Test
- void testAfterInitializationWithCorrectType() {
- MapJobRegistry registry = new MapJobRegistry();
- processor.setJobRegistry(registry);
- JobSupport job = new JobSupport();
- job.setBeanName("foo");
- assertNotNull(processor.postProcessAfterInitialization(job, "bar"));
- assertEquals("[foo]", registry.getJobNames().toString());
- }
-
- @Test
- void testAfterInitializationWithGroupName() {
- MapJobRegistry registry = new MapJobRegistry();
- processor.setJobRegistry(registry);
- processor.setGroupName("jobs");
- JobSupport job = new JobSupport();
- job.setBeanName("foo");
- assertNotNull(processor.postProcessAfterInitialization(job, "bar"));
- assertEquals("[jobs.foo]", registry.getJobNames().toString());
- }
-
- @Test
- void testAfterInitializationWithDuplicate() {
- MapJobRegistry registry = new MapJobRegistry();
- processor.setJobRegistry(registry);
- JobSupport job = new JobSupport();
- job.setBeanName("foo");
- processor.postProcessAfterInitialization(job, "bar");
- Exception exception = assertThrows(FatalBeanException.class,
- () -> processor.postProcessAfterInitialization(job, "spam"));
- assertTrue(exception.getCause() instanceof DuplicateJobException);
- }
-
- @Test
- void testUnregisterOnDestroy() throws Exception {
- MapJobRegistry registry = new MapJobRegistry();
- processor.setJobRegistry(registry);
- JobSupport job = new JobSupport();
- job.setBeanName("foo");
- assertNotNull(processor.postProcessAfterInitialization(job, "bar"));
- processor.destroy();
- assertEquals("[]", registry.getJobNames().toString());
- }
-
- @Test
- void testExecutionWithApplicationContext() throws Exception {
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("test-context.xml", getClass());
- MapJobRegistry registry = (MapJobRegistry) context.getBean("registry");
- Collection configurations = registry.getJobNames();
- String[] names = context.getBeanNamesForType(JobSupport.class);
- int count = names.length;
- // Each concrete bean of type JobConfiguration is registered...
- assertEquals(count, configurations.size());
- // N.B. there is a failure / wonky mode where a parent bean is given an
- // explicit name or beanName (using property setter): in this case then
- // child beans will have the same name and will be re-registered (and
- // override, if the registry supports that).
- assertNotNull(registry.getJob("test-job"));
- assertEquals(context.getBean("test-job-with-name"), registry.getJob("foo"));
- assertEquals(context.getBean("test-job-with-bean-name"), registry.getJob("bar"));
- assertEquals(context.getBean("test-job-with-parent-and-name"), registry.getJob("spam"));
- assertEquals(context.getBean("test-job-with-parent-and-bean-name"), registry.getJob("bucket"));
- assertEquals(context.getBean("test-job-with-concrete-parent"), registry.getJob("maps"));
- assertEquals(context.getBean("test-job-with-concrete-parent-and-name"), registry.getJob("oof"));
- assertEquals(context.getBean("test-job-with-concrete-parent-and-bean-name"), registry.getJob("rab"));
- }
-
-}
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBeanTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBeanTests.java
index 37949ce5f..91f4963ea 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBeanTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBeanTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -239,7 +239,6 @@ class StepParserStepFactoryBeanTests {
fb.setIsReaderTransactionalQueue(true);
fb.setRetryLimit(5);
fb.setSkipLimit(100);
- fb.setThrottleLimit(10);
fb.setRetryListeners(new RetryListener() {
});
@SuppressWarnings("unchecked")
@@ -251,7 +250,7 @@ class StepParserStepFactoryBeanTests {
assertTrue(step instanceof TaskletStep);
Object throttleLimit = ReflectionTestUtils.getField(ReflectionTestUtils.getField(step, "stepOperations"),
"throttleLimit");
- assertEquals(10, throttleLimit);
+ assertEquals(4, throttleLimit);
Object tasklet = ReflectionTestUtils.getField(step, "tasklet");
assertTrue(tasklet instanceof ChunkOrientedTasklet>);
assertFalse((Boolean) ReflectionTestUtils.getField(tasklet, "buffering"));
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserTests.java
index 541e40226..7d709d6ef 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StepParserTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2023 the original author or authors.
+ * Copyright 2006-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.
@@ -88,8 +88,6 @@ public class StepParserTests {
StepParserStepFactoryBean