0% found this document useful (0 votes)
44 views

Spring JDBC: Java Program

Uploaded by

Bikram KC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Spring JDBC: Java Program

Uploaded by

Bikram KC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Spring JDBC

Spring Jdbc is a powerful mechanism to connect to the


database and execute SQL queries.

Java Program
JDBC- Concept
JDBC is API to perform operation with database.

Java Program JDBC


Problems of JDBC

•We need to write a lot of Code.

•Exception Handling Problem: checked Exception

SQLException

•Repeating of all these codes from one to another

database logic is a time consuming task.


Spring JDBC
•Solution of JDBC problems are provided by

Spring JDBC

•Spring JDBC provide class JdbcTemplate which

has all the important methods to perform

operation with database.


Spring JDBC
Selecting Data using Spring JDBC
public T queryForObject( String sql , RowMapper<T> rowMapper, Object args)

public List<T> query( String sql , RowMapper<T> rowMapper)

Select query It converts


result set to
object
Row Mapper

ResultSet Object
Class Object
Row Mapper

Implementation
of row mapper

You might also like