Advantages of Spring JdbcTemplate over JDBC API
Advantages of Spring JdbcTemplate over JDBC API Spring JdbcTemplate is a powerful mechanism to connect to the database and execute SQL queries. It internally uses JDBC API, but eliminate the lot of problems of JDBC API. Problems While using JDBC API :- The common problems while using JDBC API are as below, 1) We need to write a lot of code before and after executing the query such as creating connection, statement and resultset and closing the resultset, statement and connection etc. 2) We need to perform exception handling code on the database logic. 3) We need to handle transaction. 4) Repetition of these codes i.e connection, statement and resultset codes for every transaction, so it's time consuming task. Advantages of Spring JdbcTemplate : Spring provides simplification in handling database access with the Spring JdbcTemplate which is in org.springframework.j...