The job starts in step 1 with importing customer and transaction data. You do this all in one step
because the data is contained within the same file. After the transaction data has been imported, you can
use that in step 2 to get a list of stocks that your clients currently have, and download the latest stock
prices from the Internet for them. Then, you can update the customer's accounts with the latest values
in step 3 so that you can calculate how much money their account is worth. You finish the job by
calculating the customer's fees in steps 4 and 5 of the job and print the statement itself in step 6. The rest
of the chapter goes into detail about how each of these steps is implemented and why.
To start any project, you need to begin by creating a new project shell. The next section looks at how
to take the shell provided by Spring Batch and clean it up to include just what you need.
Setting Up a New Project
To start the statement job, you need to begin with a new project shell. This project shell consists of the
Maven project structure, a POM file that addresses your build needs, and the infrastructure configured
as required. To create a new project, as you have done in the past, download the zip distribution for
Spring Batch and copy the <ZIP_ROOT>/samples/spring-batch-simple-cli directory to your workspace
renaming it statement. Figure 10-2 shows the directory structure this provides you with to start.
Figure 10-2. Template directory structure
The directory structure that the zip file provides is what you need to use, and the POM file it
includes is a good start, but you should clean up a few things that you don't use. The files to delete are as