Introduction to Spring 5

Introduction to Spring 5

Course Length:
Delivery Methods:
Course Topics
  • Learn to understand the core principles of Spring, and of Dependency Injection (DI) / Inversion of Control.
  • Learn to use the Spring Core module and DI to configure and wire application objects (beans) together.
  • Learn to know the different types of metadata (XML, annotations/@Component, and Java Configuration/@Configuration), and how and when to use them.
  • Learn to understand and use the complete capabilities of the Core module, such as lifecycle events, bean scopes, and the Spring API.
  • Learn to use Spring Boot to simplify dependency management and configuration.
  • Learn to work with the ORM (Object-Relational Mapping) module to integrate Spring with technologies such as Hibernate or JPA.
  • Learn to use Spring Data to automatically generate JPA-based repository classes.
  • Learn to understand and use Spring’s transaction support, including the easy-to-use Java annotation support, as well as the tx/aop XML configuration elements.
  • Learn to integrate Spring with Java EE Web applications.
Available Delivery Methods
Public Class
Public expert-led online training from the convenience of your home, office or anywhere with an internet connection. Guaranteed to run .
Private Class
Private classes are delivered for groups at your offices or a location of your choice.
Course Overview

This Introduction to Spring 5 training class introduces Spring's capabilities and provides guidelines on when and how to use them. It includes coverage of the three main configuration styles: Java-based (@Configuration), annotation-based (@Component), and the traditional XML-based configuration that may still play an important role in existing and new projects.

The course starts with in-depth coverage of Spring’s Core module to reduce coupling and increase the flexibility, ease of maintenance, and testing of your applications. It goes on to cover many of the most important capabilities of Spring, including easing configuration with Spring Boot, integrating Hibernate and JPA persistence layers with Spring and Spring Data, and using Spring’s declarative transaction capabilities.

Course Outline
  1. Introduction to Spring
    1. Overview of Spring Technology
      1. Motivation for Spring, Spring Architecture
      2. The Spring Framework
    2. Spring Introduction
      1. Declaring and Managing Beans
      2. ApplicationContexts - The Spring Container
      3. XML and @Component/@Named Config
    3. Dependencies and Dependency Injection (DI)
      1. Examining Dependencies
      2. Dependency Inversion / Dependency Injection (DI)
      3. DI in Spring - XML and @Autowired
  2. Configuration in Depth
    1. Java Based Configuration (@Configuration)
      1. Overview, @Configuration, @Bean
      2. Dependency Injection
      3. Resolving Dependencies
    2. Integrating Configuration Types
      1. XML and @Component Pros/Cons
      2. @Configuration Pros/Cons
      3. Choosing a Configuration Style
      4. Integrating with @Import and <import>
    3. Bean Scope and Lifecycle
      1. Singleton, Prototype, and Other Scopes
      2. Configuring Scope
      3. Bean Lifecycle / Callbacks
    4. Externalizing Properties
      1. Properties Files
      2. @PropertySource, property-placeholder
      3. Using @Value
      4. SpEL
    5. Profiles
      1. Overview and Configuration
      2. Activating Profiles
  3. Spring Boot Overview
    1. maven and Spring
    2. Spring Boot Structure
    3. Spring POMs with Boot Parents
    4. Spring Boot Starters
    5. Other Capabilities
  4. Spring Testing
    1. Testing and JUnit Overview
      1. Writing Tests - Test Classes, asserts, Naming Conventions
      2. Running Tests - IDE, maven, ...
      3. Test Fixtures - setup and teardown
    2. Spring TestContext Framework
      1. Overview
      2. Configuration
      3. Running Tests
  5. Spring and Spring Data with Hibernate/JPA
    1. Overview of Spring database support
    2. Configuring a DataSource
    3. Using Spring with Hibernate
      1. High Level Hibernate Overview
      2. SessionFactory configuration, LocalSessionFactoryBean
      3. Contextual Sessions and Spring Integration
    4. Using Spring with JPA
      1. Managing the EntityManager (EM)
      2. LocalContainerEntityManagerFactoryBean and Container-managed EMs
      3. JEE and JNDI Lookup of the EM
      4. Configuration and Vendor Adaptors
      5. Creating a JPA Repository/DAO Bean - @PersistenceUnit, @PersistenceContext
    5. Spring Data Overview
      1. Overview and Architecture
      2. Configuring Spring Data
      3. Repositories and JPA Repositories
      4. Using CrudRepository
    6. Using Spring Data
      1. Naming Conventions for Querying
      2. Creating more Complex Queries
      3. Query Configuration
  6. Spring Transaction (TX) Management
    1. Overview
    2. Declarative TX Management (REQUIRED, etc.)
    3. TX Scope and Propagation
    4. Pointcut-based Configuration of Transactions
  7. Java EE Web Applications with Spring
    1. Java EE Web App Overview
    2. ContextLoaderListener and WebApplicationContext
    3. Using Spring Beans
Class Materials

Each student in our Live Online and our Onsite classes receives a comprehensive set of materials, including course notes and all the class examples.

Class Prerequisites

Experience in the following is required for this Spring class:

  • Working knowledge of Java programming, including use of inheritance, interfaces, and exceptions.
Register for a Live Class
$1,425.00
  • See More Class Dates

Please select a class.
Request a Private Class
  • Private Class for your Team
  • Online or On-location
  • Customizable
  • Expert Instructors
Request Pricing