I am using a multiResourceItemReader in spring batch. I found about openCSV that it automatically binds csv columns to java object. But how to replace the FlatFileItemReader/multiResourceItemReader, with openCSV using CsvToBeanBuilder.
Asked
Active
Viewed 664 times
1 Answers
1
The line to object mapping logic in Spring Batch is implemented in a LineMapper
, which is used by the FlatFileItemReader
to map read lines to domain objects.
So the question "How to replace flatFileItemReader with openCSV in spring batch" is incorrect, those are not at the same level. What you can do is create a LineMapper
implementation based on OpenCSV and use it with the FlatFileItemReader
.

Mahmoud Ben Hassine
- 28,519
- 3
- 32
- 50