Module II - Spring-JDBC

·         Spring JDBC we no need to take care about open connection and closing connection
·         Exceptions are taken care by container
·we have JdbcTempalte class in springs to do this
·         It has dependency property "dataSource"
·         we have following methods in this class
a.      setDataSource(DataSource ds)
b.      update(qry)
c.       int queryForInt()
d.      float queryForFloat()..for List, date, Array
·         These methods never throws Compile time exp, only runtime excep
·         all compile time exceptions are converted into DataAccessException (R.Exp)
·         all exceptions classes are  in spring-dao.jar
·         No need to worry about con.close()
·         preparedStatement type safe by using Types class

Spring-JDBC is nothing but dealing with below classes
1.     JdbcTemplate
2.     NamedParameterJdbcTemplate
3.     SimpleJdbcTemplate