JDBCTemplate, RowMapper,ResultSetExtractor,BeanPropertyRowMapper Spring-Ep:9

Опубликовано: 24 Апрель 2026
на канале: Ajoy Debnath
100
9

Hi,
Hope you are all doing great. Let's learn together.

Join Telegram: 📲 https://t.me/contactajoydebnath

Chapters ❤
0:00 Introduction
02:01 Discuss the previous day's topic
07:34 Perform DQL (SELECT QUERY) using JDBC
14:45 JDBCTemplate
17:32 JDBCTemplate Code Implementation
19:59 JDBCTemplate Code Implementation With RowMapper
30:53 JDBCTemplate Code Implementation With ResultSetExtractor
41:01 RowMapper implementation using lambda expression
46:26 JDBCTemplate Code Implementation With BeanPropertyRowMapper
57:23 SQL Injection

Note:
Spring is a lightweight framework. It was developed by Rod Johnson in 2003. Spring framework makes the easy development of JavaEE applications.

Video Links --
Spring JDBCTemplate, JDBC, Statement, and PreparedStatement --    • Spring JDBCTemplate, JDBC, Statement and P...  
What if we remove the @Configuration annotation in Spring? --    • What if we remove the @Configuration annot...  
@Configuration, @Bean, @Component, @ComponentScan in Spring. --    • @Configuration, @Bean, @Component, @Compon...  
Autowiring, Autowiring Modes - byName, byType & constructor. --    • Autowiring, Autowiring Modes - byName, byT...  
Bean Scope, Sinton Scope, and Prototype Scope. --    • Bean Scope, Singleton Scope, and Prototype...  
IOC Container, BeanFactory, Important APIs, Lazy & Eager Loading. --    • IOC Container, BeanFactory, Lazy & Eager L...  
IOC, Dependency Injection, IOC Container, Coupling -    • IOC,Dependency Injection,IOC Container,Cou...  
Core Java Playlist -    • Core Java  

Document Link -
https://docs.google.com/document/d/1w...

Like, Comment, Share, and Subscribe.
Thank you again.

STS Link:
https://spring.io/tools

JDK Link:
https://www.oracle.com/java/technolog...

To download spring jars
https://repo.spring.io/ui/native/rele...

MySQL Connector JAR
https://mvnrepository.com/artifact/my...

MySQL Installer
https://dev.mysql.com/downloads/insta...

Spring IOC Container
Spring IoC Container is the core of Spring Framework. It creates the objects, configures and assembles their dependencies, and manages their entire life cycle. The Container uses Dependency Injection(DI) to manage the components that make up the application. It gets the information about the objects from a configuration file(XML) or Java Code or Java Annotations and Java POJO class. These objects are called Beans.

Bean
In Spring, the objects that are managed by the Spring IoC container are called Beans.

SQL
Structured Query Language(SQL) as we all know is the database language by which we can perform different operations in a Database.

DDL: Data Definition Language
DDL is a set of SQL commands used to create, modify, and delete database structures but not data.CREATE, DROP, ALTER, TRUNCATE.
DQL: Data Query Language
This command allows getting the data out of the database to perform operations with it. SELECT
DML: Data Manipulation Language
The SQL commands that deal with the manipulation of data present in the database belong to DML. INSERT, UPDATE, DELETE.
DCL: Data Control Language
DCL includes commands such as GRANT and REVOKE which mainly deal with rights and permissions. GRANT, REVOKE
TCL: Transaction Control Language
Transactions group a set of tasks into a single execution unit. COMMIT, ROLLBACK, SAVEPOINT

JDBC
Java Database Connectivity (JDBC) is a data access technology for Java. It provides methods to perform different operations (DDL, DQL, DML..) in the Database.

Class.forName("com.mysql.cj.jdbc.Driver");
Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/youtube","root","root");
Statement statement = connection.createStatement();
int value = statement.executeUpdate("insert into employee(name,code) values ('Hello','1234')");
System.out.println("Row Effected "+value);

JdbcTemplate
Spring JdbcTemplate is a powerful mechanism to connect to the database and execute SQL queries.

DataSource Configuration (MySQL Database)
org.springframework.jdbc.datasource.DriverManagerDataSource
driverClassName
com.mysql.cj.jdbc.Driver
url
jdbc:mysql://localhost:3306/youtube
username
root {your database username}
password
root {your database password}

Database JDBC Driver Name and URL
Database
JDBC Driver Name
Connection URL Format
MySQL
com.mysql.cj.jdbc.Driver
jdbc:mysql://hostname/ databaseName
ORACLE
oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@hostname:port Number:databaseName
DB2
COM.ibm.db2.jdbc.net.DB2Driver
jdbc:db2:hostname:port Number/databaseName
Sybase
com.sybase.jdbc.SybDriver
jdbc:sybase:Tds:hostname: port Number/databaseName