• Online, Self-Paced
Course Description

The Spring Framework is an open source framework and inversion of controller container for the Java platform. The Spring Framework is one of the most popular application development frameworks for creating enterprise Java applications. This course covers using databases in a Spring application. In this course, you will learn the basics of database access from within a Spring application, including how to create, retrieve, update, and delete database records, as well as how to deal with database exceptions.

Learning Objectives

Data Access Using Jdbc

  • start the course
  • recognize the various steps in configuring database access in a Spring application
  • set up a Jdbc driver class to help connect to a MySQL database
  • declare a datasource bean that can be used to connect to a running MySQL server
  • declare a datasource bean that gets its properties set from a properties file
  • declare a datasource bean that can provide a pool of database connections for an application to work with
  • create a Data Access Object class that will be used to perform database operations
  • recognize what the JdbcTemplate class is and some of the database access features it provides
  • use a Data Access Object to retrieve records from a database

Basic Database Operations Using Spring

  • recognize how to use Spring to support basic database operations
  • use named parameters when creating SQL queries
  • retrieve a record from the database converted to a domain object
  • use the update method of the JdbcTemplate class to insert records into a database
  • construct SQL queries directly from the properties of beans using BeanPropertySQLParameterSource
  • use the update method of the JdbcTemplate class to update records in a database
  • use the update method of the JdbcTemplate class to remove records from a database

Exceptions, Batch Updates, and Transactions

  • describe database exception handling in Spring applications
  • handle basic database exceptions in a Spring application
  • perform batch updates on a database from a Spring application
  • perform database transactions from a Spring application

SimpleJdbcClasses and Alternative Configurations

  • describe the SimpleJdbc classes provided by Spring for specific database operations
  • insert records into a MySQL table using the SimpleJdbcInsert class
  • call a stored procedure on a database using the SimpleJdbcCall class
  • use the queryForObject method to specify types for data being returned from a database
  • declare a Data Access Object in an XML configuration

Practice: Working with Data In Spring

  • use a Spring application to access and modify data in a database

Framework Connections

The materials within this course focus on the Knowledge Skills and Abilities (KSAs) identified within the Specialty Areas listed below. Click to view Specialty Area details within the interactive National Cybersecurity Workforce Framework.