In this post under Spring Batch, I will explain how to achieve Item Transformation using ItemProcessor interface. Item Transformation process transforms the items read by reader before sending them to the writer. The transformation involves changing the state of the read itemor creating a completely new object. In the second case, the written item type…… Continue reading Transforming items using ItemProcessor
Tag: ItemProcessor
Chaining multiple ItemProcessor
In this post of Spring Batch, I will explain with an example how to chain multiple ItemProcessors. For my example, I will create an ItemProcessor which will go through employee records one item at a time and filter out odd records. Below is the code of the ItemProcessor package xml.package11; import org.springframework.batch.item.ItemProcessor; public class EmployeeFilterItemProcessor…… Continue reading Chaining multiple ItemProcessor
Filtering items using ItemProcessor
In Spring Batch, items are read from the source using reader and written to destination using a writer. Sometimes, we need to add business logic between the reader and writer for the following purpose1) Filtering an item2) Converting an item read from one format to another before written to the destination3) Modify the item read…… Continue reading Filtering items using ItemProcessor