I'm trying to understand how JdbcCursorItemReader works. I noticed that the ItemReader read() method eventually calls readCursor() method from JdbcCursorItemReader where we pass the complete resultset and current position of record to be read to rowMapper. RowMapper interface documentation says that we aren't supposed to call next on resultset and the resultset param is pre-initialized for current row. How and in which class is spring doing this pre-initialization?
JdbcCursorItemReader - passing complete resultset everytime read() is called