Spring – Difference between JDBC and Spring JDBC | Code Factory


Donate : Link

Medium Blog : Link

Applications : Link

This image has an empty alt attribute; its file name is image-1.png

Spring Tutorial Index Page: Link

Difference between JDBC and Spring JDBC

JDBCSpring JDBC
All the exceptions are compiletime exception (CE)All the exceptions are runtime exception (RE).
CE is java.sql.SQLException (It will print database exceptions).RE is DataAccessException (It will print database exceptions). It is in spring-dao.jar file.
User must need to close connection.User no need to close connection.
Jdbc PreparedStatement is type safe.All JdbcTemplate methods are type safe using Types class.
For select operation always it will return ResultSet.Generic select methods for all type of select operations.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s