Building Applications Using Spring JDBC

This course covers integrating Spring JDBC into your application. You'll learn setup and configuration, PreparedStatements, RowMapper, NamedParameter, and their various approaches utilizing JdbcTemplate, SimpleJdbcInsert, and SimpleJdbcCall.
Course info
Rating
(62)
Level
Intermediate
Updated
Apr 27, 2017
Duration
2h 33m
Table of contents
Description
Course info
Rating
(62)
Level
Intermediate
Updated
Apr 27, 2017
Duration
2h 33m
Description

Interacting with a database in Java applications has been a challenge for a long time, with developers wondering the best practices for doing so. In this course, Building Applications Using Spring JDBC, you'll learn how to use the Spring JDBC framework to implement the CRUD functions of your application. First, you'll dive into understanding the CRUD functions of data access and retrieval, along with batch operations. Next, you'll discover how to implement the other best practices of Spring such as RESTful services, design patterns, and multi-tier development. Finally, you'll cover exception handling and transactions. The functionality of this course will be tested through unit tests and web services that could also be consumed through a Javascript UI, such as Angular or React. By the end of this course, you'll know how to effectively use Spring JDBC to interact with your data in your applications.

About the author
About the author

Bryan is a Director at Software Technology Group, a consulting company based out of Salt Lake City, and has authored and taught numerous courses in Java.

More from the author
Maven Fundamentals
Intermediate
2h 24m
Jun 28, 2019
What’s New in Spring 5
Intermediate
1h 25m
Jan 31, 2018
More courses by Bryan Hansen
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hi everyone, my name is Bryan Hansen and welcome to my course Building Applications Using Spring JDBC. I'm the director of development at Software Technology Group and now a seasoned author on Pluralsight. Interacting with the database has always been harder than it should be in Java. Spring and the Spring JDBC framework give us a great alternative and make it quite easy to access our data. In this course we're going to set up a database in a framework to fully utilize Spring JDBC for accessing our data tier. Some of the major topics we will cover are all of the CRUD functions of data access and retrieval, as well as batch operations and exception handling and transactions. By the end of this course we will know how to effectively use Spring JDBC in our application. Before beginning this course you should be familiar with Java and an IDE such as Spring STS or Eclipse. I hope you'll join me on this journey of learning how to build applications using Spring JDBC at Pluralsight.

Introduction
With Hibernate, JPA, JDBC and other persistence frameworks available in Java, are you wondering why you would use Spring JDBC? Maybe you know why you want to use it, but aren't sure where to start. Hello, I'm Bryan Hansen and welcome to my course on Building Applications Using Spring JDBC on Pluralsight. In this course we are going to be learning about integrating a data layer using Spring JDBC. We will discuss why you would want to use Spring JDBC over some of the alternatives and we will deep dive into configuration and various CRUD functions, as well as cover how to handle exceptions gracefully while using the Spring JDBC framework.

Setting up the JDBC Project
In this module we are going to walk though the environment installation and get everything ready for the remainder of the course. By the end of this module we will have installed a database, created a schema, and configured our IDE and project for development.

Creating Records in the Database
In this module we are going to walk through creating records in the database. We are going to create a unit test, modify our controller service and repository tier, and then use the JDBC template API to insert records into the database.

Reading Records from the Database
In this module we're going to walk through reading records from the database. In previous examples we had a Create method that did an insert into the database. We're now going to make that return an object using the Read methods in Spring JDBC.

Updating Records in the Database
In this module we're going to walk through updating records in the database. In the last module we created a method to retrieve a single record, but we didn't expose it to the UI and are going to do that in this module and use it to retrieve records to update. We're also going to show batch update functionality.

Deleting Records from the Database
In this module we're going to walk through deleting records from the database. Deleting records is fairly straightforward, we're going to look at a few solutions to incorporate into your application.

Exceptions and Transactions
In this module we're going to talk about handling exceptions and how to work with transactions. Up until this point we have executed code, being careful not to instigate any exceptions nor requiring the need to roll back from a transaction. Let's dive into how to handle exceptions and gracefully roll back a transaction.