Reputation: 333
I have a Spring Batch import process that has the following steps:
I currently have #1 in a set of Readers (one for each file format), and #2 and #3 in single Writer class. I feel that writing the results file should be a separate step from writing the data to the database, but I am not sure how to do this.
The options I know of are:
Are there other options and which option would be the way Spring Batch is designed for?
Upvotes: 0
Views: 1087
Reputation: 97835
You can separate the current ItemWriter
you have into two ItemWriter
s and use a CompositeItemWriter
as your chunk writer. This will delegate in the order you specify to the your two writers.
Upvotes: 1