How to do it...

Let's create a standalone application that transforms XML to a text file using the following steps:

  1. Using Eclipse STS, create a Maven project, ch11-batch-sync, that contains the Spring Boot 2.0.0.M2 starter POM dependencies, such as actuator and JDBC, with some support plugins such as the MySQL connector.
  1. Add the starter POM dependency for the latest Spring Batch 4.0:
<dependency> 
   <groupId>org.springframework.boot</groupId> 
   <artifactId>spring-boot-starter-batch</artifactId> 
</dependency> 
  1. Since XML parsing is involved, add the Spring OXM module with its XSTREAM dependency in pom.xml:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> </dependency> <dependency> <groupId>com.thoughtworks.xstream</groupId> ...

Get Spring 5.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.