In spring batch, I have an requirement to read from the database and to write in a file, The no of rows allowed in a file is N, so if N+10 records are fetched then two files should be created containing N rows and 10 rows respectively.
Can someone please help me with the writer implementation? Is there any other easy way of doing it? Thanks.