JdbcTemplate and SimpleJdbcTemplate

Mohan picture Mohan · Apr 25, 2012 · Viewed 20.6k times · Source

I am new to Spring 3.0 . For DAO access i have choosen SpringJDBC. SpringJDBC provides JDBC Template and SimpleJDBCTemplate . Which one is best. I read in some of the forum SimpleJDBCTemplate going to be deprecated in Spring 3.1. What is the difference between these two.Guide me which one is best.

Answer

axtavt picture axtavt · Apr 25, 2012

In Spring 3.x you should use JdbcTemplate.

In previous versions of Spring SimpleJdbcTemplate leveraged new features of Java 5, whereas JdbcTemplate maintained compatibility with pre-Java 5 environments. But now all features of SimpleJdbcTemplate have been added to JdbcTemplate.