This page describes how convert the spring hello world example application to work using spring batch 2.1.x.
Background
The Hello World With Spring Batch was written a while ago. Since then there was a new version of spring batch released. Instead of changing the original article, I chose to write a new one just describing the changes needed to get the application described there to work.
The original article is located here:
http://numberformat.wordpress.com/2010/02/05/hello-world-with-spring-batch/
Step 1
Update the pom.xml dependency for spring-batch-core.
pom.xml
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-core</artifactId>
<version>2.1.8.RELEASE</version>
</dependency>
Step 2
update the xml:
src/main/resources/simpleJob.xml
http://www.springframework.org/schema/batch/spring-batch-2.0.xsd">
with
http://www.springframework.org/schema/batch/spring-batch-2.1.xsd">
Finally Run the command just like before:
mvn clean compile exec:java -Dexec.mainClass=org.springframework.batch.core.launch.support.CommandLineJobRunner -Dexec.args="simpleJob.xml helloWorldJob"
That’s all for now!
1 Response to “Hello World With Spring Batch 2.1.x”