0
votes

I am using spring batch for batch processing.

I am using MultiResourceItemReader to initialize the reader object. I did set the resources.

In FlatFileItemReader, i wanted to get the current filename so that i can manipulate data based on filename.

1
Implemented ResourceAware, but i couldn't get the resource. - VIJAYKUMAR SUBRAMANI
spring batch 3.0.7 - VIJAYKUMAR SUBRAMANI
Show your code please. - Nghia Do

1 Answers

0
votes
MultiResourceItemReader#getCurrentResource()

This returns the currentResource being read, and Resource has getFileName method which you can use to get the name.