Installing and configuring Spring Batch
Spring automatically saves some metadata (start time, end time, and status) about jobs and their steps in a job repository, which consists of several database tables. In this recipe, we'll create these tables. We will also create a Spring configuration class dedicated to batch jobs.
How to do it…
Here are the steps to install and configure Spring Batch:
Add the Maven dependencies for Spring Batch in
pom.xml
:<dependency> <groupId>org.springframework.batch</groupId> <artifactId>spring-batch-core</artifactId> <version>3.0.2.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.batch</groupId> <artifactId>spring-batch-infrastructure</artifactId> <version>3.0.2.RELEASE</version> </dependency>
Add the Maven dependencies for Spring JDBC and Spring Transaction in
pom.xml
:<dependency> <groupId>org.springframework...