Spring JDBC Framework Overview
by, 07-07-2012 at 07:30 PM (1107 Views)
It is cumbersome to write useless and unnecessary code when working with the database using old JDBC which is old and plain to handle database connections and exceptions etc. All the minor details are handled by the Spring JDBC framework like open a database connection, prepare a SQL statement, execute a SQL statement, handle transactions, process exception and close a database connection.
You job is to only define the parameters for database connections and SQL statements so that it can be executed. Also perform necessor tasks to fetch data from the database for each iteration.
Different classes and approaches are provided by the Spring JDBC to interact with the database. The JdbcTemplate class is one of the most popular approach of this framework. All the database communication is managed by this class that is central framework class. It also handles exceptions.