That’s where callback comes into picture. Fetching data from DB using select query has, as usual, theįixed part like getting connection, cleaning up, handling exception but at the same time Spring framework does need help In the post Data access in Spring framework it has been discussed in detail how Spring framework provides templates to manage theįixed part and uses call back to handle the variable part. This post shows how to use Select query using JdbcTemplate in Spring framework and also talks about the callback methods in detail which shows how you can do resultset to model mapping using RowMapper implementation. Purpose for doing that is to discuss in detail the callback part of the JdbcTemplate. I left behind the part to read from Database using Select query. In the post Spring JdbcTemplate Insert, Update And Delete Example I have already discussed how JdbcTemplate can be used for inserting and updating data in the DB.
0 Comments
Leave a Reply. |