Skip to content

Commit a08c43c

Browse files
committed
Deprecate the batch XML namespace
Resolves #4843
1 parent c4e9a94 commit a08c43c

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceHandler.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,20 +15,28 @@
1515
*/
1616
package org.springframework.batch.core.configuration.xml;
1717

18+
import org.apache.commons.logging.Log;
19+
import org.apache.commons.logging.LogFactory;
20+
1821
import org.springframework.beans.factory.xml.NamespaceHandler;
1922
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
2023

2124
/**
2225
* @author Dave Syer
26+
* @author Mahmoud Ben Hassine
2327
*
2428
*/
2529
public class CoreNamespaceHandler extends NamespaceHandlerSupport {
2630

31+
private static final Log LOGGER = LogFactory.getLog(CoreNamespaceHandler.class);
32+
2733
/**
2834
* @see NamespaceHandler#init()
2935
*/
3036
@Override
3137
public void init() {
38+
LOGGER.info(
39+
"DEPRECATION NOTE: The batch XML namespace is deprecated as of Spring Batch 6.0 and will be removed in version 7.0.");
3240
this.registerBeanDefinitionParser("job", new JobParser());
3341
this.registerBeanDefinitionParser("flow", new TopLevelFlowParser());
3442
this.registerBeanDefinitionParser("step", new TopLevelStepParser());

spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<xsd:annotation>
1515
<xsd:documentation><![CDATA[
1616
Defines the configuration elements for Spring Batch Core.
17+
NOTE: The batch XML namespace is deprecated as of Spring Batch 6.0 and will be removed in version 7.0.
1718
]]></xsd:documentation>
1819
</xsd:annotation>
1920

spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/BatchIntegrationNamespaceHandler.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,6 +15,9 @@
1515
*/
1616
package org.springframework.batch.integration.config.xml;
1717

18+
import org.apache.commons.logging.Log;
19+
import org.apache.commons.logging.LogFactory;
20+
1821
import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler;
1922

2023
/**
@@ -27,8 +30,12 @@
2730
*/
2831
public class BatchIntegrationNamespaceHandler extends AbstractIntegrationNamespaceHandler {
2932

33+
private static final Log LOGGER = LogFactory.getLog(BatchIntegrationNamespaceHandler.class);
34+
3035
@Override
3136
public void init() {
37+
LOGGER.info(
38+
"DEPRECATION NOTE: The batch XML namespace is deprecated as of Spring Batch 6.0 and will be removed in version 7.0.");
3239
this.registerBeanDefinitionParser("job-launching-gateway", new JobLaunchingGatewayParser());
3340
RemoteChunkingManagerParser remoteChunkingManagerParser = new RemoteChunkingManagerParser();
3441
this.registerBeanDefinitionParser("remote-chunking-manager", remoteChunkingManagerParser);

spring-batch-integration/src/main/resources/org/springframework/batch/integration/config/xml/spring-batch-integration.xsd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
<xsd:annotation>
1515
<xsd:documentation><![CDATA[
16-
Defines the configuration elements for the Spring Batch Integration
17-
Support.
16+
Defines the configuration elements for the Spring Batch Integration Support.
17+
NOTE: The batch XML namespace is deprecated as of Spring Batch 6.0 and will be removed in version 7.0.
1818
]]></xsd:documentation>
1919
</xsd:annotation>
2020

0 commit comments

Comments
 (0)