I would like to use Spring JDBCTemplate but I would like to receive a ResultSet, which is not storing full query result in memory, as you would find executing standard statement with java JDBC. The closest I found to the ResultSet was
SqlRowSet sqlRowSet = template.getJdbcOperations().queryForRowSet(query, queryParameters);
but this loads the whole DB result into memory?
If you want to get a ResultSet object with JDBCTemplate you can retrieve the javax.sql.Connection with the following code:
And you can now perform a createStatement() or preparedStatement() to get the ResultSet object.
That’s the only way it comes to my mind. I hope this will help you.