diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java
index 5b99c18a6..1f4042218 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java
@@ -61,6 +61,8 @@ public abstract class AbstractStepParser {
bd.getPropertyValues().addPropertyValue("tasklet", taskletBeanRef);
}
+ checkStepAttributes(stepElement, bd);
+
RuntimeBeanReference jobRepositoryBeanRef = new RuntimeBeanReference(jobRepositoryRef);
bd.getPropertyValues().addPropertyValue("jobRepository", jobRepositoryBeanRef);
@@ -118,14 +120,7 @@ public abstract class AbstractStepParser {
}
// now, set the properties on the new bean
- String startLimit = element.getAttribute("start-limit");
- if (StringUtils.hasText(startLimit)) {
- bd.getPropertyValues().addPropertyValue("startLimit", startLimit);
- }
- String allowStartIfComplete = element.getAttribute("allow-start-if-complete");
- if (StringUtils.hasText(allowStartIfComplete)) {
- bd.getPropertyValues().addPropertyValue("allowStartIfComplete", allowStartIfComplete);
- }
+ checkStepAttributes(stepElement, bd);
String readerBeanId = element.getAttribute("reader");
if (StringUtils.hasText(readerBeanId)) {
@@ -206,6 +201,17 @@ public abstract class AbstractStepParser {
}
+ private void checkStepAttributes(Element element, RootBeanDefinition bd) {
+ String startLimit = element.getAttribute("start-limit");
+ if (StringUtils.hasText(startLimit)) {
+ bd.getPropertyValues().addPropertyValue("startLimit", startLimit);
+ }
+ String allowStartIfComplete = element.getAttribute("allow-start-if-complete");
+ if (StringUtils.hasText(allowStartIfComplete)) {
+ bd.getPropertyValues().addPropertyValue("allowStartIfComplete", allowStartIfComplete);
+ }
+ }
+
private boolean checkIntValueForFaultToleranceNeeded(String stringValue) {
if (StringUtils.hasText(stringValue)) {
int value = Integer.valueOf(stringValue);
diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd
index 884bd0826..6ef46c57f 100644
--- a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd
+++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd
@@ -65,7 +65,7 @@
-
+
@@ -145,7 +145,7 @@
-
+
@@ -384,20 +384,6 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -707,6 +693,20 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepParserTaskletAttributesTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepParserTaskletAttributesTests-context.xml
index bdeb12d2e..5a9d9b0fc 100644
--- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepParserTaskletAttributesTests-context.xml
+++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StepParserTaskletAttributesTests-context.xml
@@ -5,9 +5,8 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
+