I am using Spring Batch to write multiple reports. Requirement is i will get records with BranchId and name. I need to create one file for each branchId and write respective data into that file along with some header and footer. Example: In this case it should create total 3 files . I am using ClassifierCompositeItemWriter to create / reuse