Fast Track to Spring 4

Course Description

Over the years, Spring has added many new capabilities, in line with the increasing capabilities of the Java platform. As well as being current with Spring 4, this course introduces techniques for using these powerful capabilities. It includes complete 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. It also provides guidelines for when and how to use each one.
3 days
Contact us for pricing
Contact us for dates
Contact us for dates


A strong working knowledge of Java, JDBC, and Servlets/JSP.

Introduction to Spring

Overview of Spring Technology
Spring vs. JEE
What is Spring?
The Spring Modules
The Spring Jars
Spring Introduction
Managing Beans
The JavaTunes Online Store
XML Bean Definitions
Declaring Beans
Spring’s XML Schemas
The Spring Container
Working with Spring
Why Bother?
ApplicationContext Interface
Common Application Context
Specifying Configuration Files
A Word About Junit
Dependencies and Dependency Injection
Dependencies Between Objects
Dependency Inversion Principal
Dependency Inversion Illustrated
Dependency Injection Configuration
DI Hides Dependencies
Dependency Injection Reduces Coupling

Configuration in Depth

Annotation-based Configuration
Annotations for Spring Configuration
Declaring Beans and DI with Annotations
Complete Declarations Using Annotations
Using @Inject/@Autowired
Enabling Annotations/ Detecting Beans
Wiring Strategies So Far
Java-based Configuration
Using Java-based Configuration
Dependency Injection
How Does it Work?
Dependencies in Configuration Classes
Other @Bean Capabilities
Java-based Configuration – Pro/Con
Integrating Configuration Types
Choosing a Configuration Style
Importing between XML/@Configuration
Scanning for @Configuration Classes
Bean Scope and Lifecycle
Specifying Bean Scope
Bean Creation Lifecycle – Advanced Details

Wiring in Depth

Value Injection
Configuring Value Properties, Property Conversions
Externalizing Values in Properties Files
Constructor Injection
Configuration - @Configuration and XML
P: and C: namespaces for XML configuration
Qualifiers/Domain Specific Language (DSL)
Limitations of Autowiring
Qualifiers and DSL
Creating and Using an Annotation-Based DSL for Bean Configuration
Benefits of Qualifiers for Bean Configuration
Configuring Profiles (XML & @Configuration)
Activating Profiles
Overview of SpEL

Database Access with Spring

Overview of Spring database support
Configuring a DataSource
Using Spring with Hibernate
High Level Hibernate Overview
SessionFactory configuration
Contextual Sessions and Spring Integration
Using Spring with JPA
Managing the EntityManager (EM)
JEE and JNDI Lookup of the EM
Configuration and Vendor Adaptors
Creating a JPA Repository/DAO Bean

Aspect Oriented Programming

Overview of AOP
Crosscutting Concerns
AOP Basics, Aspect, Joinpoint, Advice, Pointcut
Spring AOP Introduction
Configuration - XML and @AspectJ
Defining an Aspect, Pointcut, and Advice
Pointcut Expressions and Advice
The execution() Designator
Kinds of Advice
Marker Annotations (Rubber Stamp AOP)
Issue with AOP Configuration
Defining an AOP Marker / Rubber Stamp
Advantages of Marker Annotations
@AspectJ Based AOP Support
@AspectJ Annotations Overview
Defining an Aspect, Pointcut, and Advice
Spring AOP Proxies and Self-Invocation Issues
Load-Time Weaving
Caveats of AOP

Spring Transaction (TX)

Intro to Spring Transaction Management
Spring Transaction Managers
Spring TX Scope and Propagation
Spring TX Attributes
XML Configuration of Transactions
Specifying Advice, TX Attributes, and Methods
Linking Advice with Pointcuts
Benefits of XML Configuration of TX Behavior

Web Applications with Spring

Integrating Spring with Java EE Web Apps
Using Spring beans in Web app controller logic

XML Specific Configuration

Collection Valued Properties – Configuring and using lists, sets, etc.
Additional Capabilities
Factory Classes and Factory Methods
Definition Inheritance (Parent Beans)
AutoWiring with XML
Inner Beans, Compound Names

SpringSpring FrameworkSpring MVC