JdbcTemplatethe central framework class that manages all the database communication and exception handling.Instances of the JdbcTemplate class are threadsafe once configured. So you can configure a single instance of a JdbcTemplate and then safely inject this shared reference into multiple DAOs.
A common practice when using the JdbcTemplate class is to configure a DataSource in your Spring configuration file, and then dependency-inject that shared DataSource bean into your DAO classes, and the JdbcTemplate is created in the setter for the DataSource.
reference: jdbc_spring
StudentJDBCTemplate.java
|
|
bean.xml
|
|
The SimpleJdbcCall class can be used to call a stored procedure with IN and OUT parameters.
see :stored procedure