当前位置: 动力学知识库 > 问答 > 编程问答 >

spring batch - Custom ItemReader to return more than one rows[based on some column value] to ItemProcessor

问题描述:

I have a file with multiple rows. I need to read more than one rows based on some column value and pass it to Processor as List.

Sample Input file is:

2|joe|24|CA

2|sam|32|MA

2|joe|44|CA

3|amy|21|CA

The file is sorted based on first field.

I wanted to pass first three rows to processor as List<item> then last row as separate List<item>

Is it something we can do with CustomItemReader?

Regards,

Shankar

分享给朋友:
您可能感兴趣的文章:
随机阅读: