What is JdbcTemplate in Spring DAO?
Answered
What is JdbcTemplate in Spring DAO?
Best answer
Spring’s JdbcTemplate class is the central class to interact with a database through JDBC. It handles the creation and release of resources. It performs the basic tasks of the core JDBC workflow such as statement creation and execution, leaving application code to provide SQL and extract results.
The JdbcTemplate class executes SQL queries, update statements and stored procedure calls, performs iteration over ResultSets and extraction of returned parameter values. It also catches JDBC exceptions and translates them to the generic, more informative, exception hierarchy defined in the org.springframework.dao package.