Home About Courses Schedule Services Webinars Contact Search

Fast Track to Spring 3

SEE SCHEDULE

Duration: 3 Days

Method: Instructor led, Hands-on workshops

Price: $1800.00

Course Code: SP1005



Audience

This is an introductory to intermediate level training course, designed for experienced Java developers and architects who need to implement applications using the Spring framework.

Description

Spring is a lightweight Java framework for building enterprise applications. Its Core module allows you to manage the lifecycle of your objects and the dependencies between them via configuration metadata (either XML or annotations) and Dependency Injection / Inversion of Control. Its advanced capabilities provide support for JDBC and persistence frameworks like Hibernate (DAO and ORM modules), Aspect-Oriented Programming (AOP module), and integration with Java EE Web technologies, security, transactions, and more.

Based on the Spring 3 release, the course includes complete coverage of the annotation based approach to configuration and the use of Java-5 capabilities that were first introduced in Spring 2.x, and which have been greatly enhanced in Spring 3. It also provides coverage of the traditional XML-based configuration that can still play an important role in existing and new projects.

We begin with the basics of Spring and in-depth coverage on using the powerful capabilities of the Core module to reduce coupling, and increase the flexibility, ease of maintenance, and testing of your applications. We go on to cover all the important capabilities of Spring 3, including using Spring to simplify the creation of a persistence layer with JDBC and/or persistence frameworks like Hibernate and JPA.

We will also cover advanced Spring capabilities such as using Spring's Aspect Oriented Programming (AOP) to program cross-cutting concerns such as transactions and security. In addition, you will learn about integration of Spring with Java EE Web applications, and an introduction to Spring Security v3, its architecture, and how to use it to secure both Web application requests and bean invocations.

Hands on labs reinforce all the important concepts, enabling you to build working Spring applications, and giving you an understanding of the important concepts and technology in a very short time. The standard platform does all labs with the Eclipse IDE, and the lab instructions include detailed directions for setting up and using it. The course is available for all major development environments, including eclipse, IBM RAD and IntelliJ.

Objectives

Upon successful completion of this course, the student will be able to:

  • Understand the core principles of Spring, and of Dependency Injection (DI)/Inversion of Control
  • Use the Spring Core module and DI to configure and wire application objects (beans) together
  • Understand and use the complete capabilities of the Core module, such as lifecycle events, bean scopes, and the Spring API
  • Work with the DAO and/or ORM modules to create a well structured persistence layer with JDBC
  • Use Springs Data Integration with JDBC and technologies such as Hibernate or JPA
  • Understand and use Spring's powerful new AOP capabilities for programming cross-cutting concerns across multiple points in an application
  • Understand and use Spring's transaction support, including its easy to use tx/aop XML configuration elements and Java 5 annotations
  • Integrate Spring with Java EE Web applications
  • Understand the basics of Spring Security, and how to secure Web apps and Spring managed beans with it
  • Understand and use Spring Web Flow 2 to define complex user interface flow in Web applications

Prerequisites

Attendees should have Java development experience or have taken an introductory-level Java course.

Topics

  1. Introduction
    • Overview of Spring Technology
      • Shortcomings of Java EE, Spring Architecture
    • Spring Introduction
      • Managing Beans, The Spring Container, IoC, DI
      • Configuration Metadata - XML, @Component, Auto-Detecting Beans
    • Dependencies and Dependency Injection (DI)
      • Dependency Inversion, Dependency Injection (DI) in Spring, DI Configuration - XML, @Resource
  2. More about Bean Properties
    • Working with Properties
      • Configuring Value Properties, Property Conversions, Setter / Constructor Injection
    • Spring Expression Language for Configuration
    • Collection Valued Properties
      • Configuring and using lists, sets, etc.
    • Additional Capabilities
      • Factory Methods, Bean Aliases, Definition Inheritance (Parent Beans)
  3. The Spring Container and API
    • ApplicationContext
      • ClassPathXmlApplicationContext, FileSystemXmlApplicationContext, Constructors, Usage
    • Resource Access - Overview, Resource Implementations
    • Validation
      • Overview, JSR-303
      • Declarative Validation, @NotNull, @Size, @Min, etc
      • Configuration, Injection
    • Bean Scope and Lifecycle
      • Bean Scope Defined, Configuring, Inner Beans, Bean Creation Lifecycle, Lifecycle Callbacks, BeanPostProcessor, Event Handling
    • MessageSources
      • Defining and Using Resource Bundles, Localization/I18N
    • Annotation Driven Configuration
      • Stereotypes: @Component, @Service, @Controller, @Repository
      • Java EE 5 Annotation Support
      • Defining Custom Annotations
      • Autowiring
      • @Autowired on setters, constructures, methods, fields
      • Injecting resources like ApplicationContext
      • Fine tuning with @Qualifier
    • Java Based Bean Metadata (JavaConfig)
      • Overview - code-centric Configuration
      • @Confguration, @Bean, and @Value
      • Importing and @Import
      • Autowiring in Configuration Classes
      • Mixing XML Configuraiton and @Configuration
      • XML vs Annotation Based Configuration
    • Other Capabilities
      • SpEL - Spring Expression LanguageValidation
  4. Database Access with Spring
    • Issues with JDBC / Typical JDBC Flow
    • Introduction to Spring DAO Support
      • Spring Database API, (Simple)JdbcTemplate, (Simple)JdbcDaoSupport, DataSources,
    • Queries and Inserts
      • RowMapper, ParameterizedRowMapper, Passing Arguments, queryForObject, query, update
    • Additional API Capabilities
      • Additional query methods, Passing Type Arguments, queryForList, FetchSize, MaxRows
    • Using Spring with Hibernate
      • Overview of Template Approach, SessionFactory configuration
      • Using Contextual Sessions
    • Using Spring with JPA
      • LocalEntityManagerFactoryBean, LocalContainerEntityManagerFactoryBean, JNDI, PersistenceUnitManager
      • DAO Support - @PersistenceUnit, @PersistenceContext
  5. Aspect Oriented Programming (AOP)
    • Overview of AOP
      • AOP Basics, Aspect, Joinpoint, Advice, Pointcut
    • Introduction to Spring AOP
      • Capabilities, Configuration (Annotation Based and XML), Weaving, Joinpoints
    • Using Aspects
      • Defining Advice, Configuring Pointcuts, Targets and Proxies
      • AspectJ Pointcuts, Autoproxies
    • Using @AspectJ Annotations
      • @ApsectJ Annotations, Declaring Advice
  6. Spring Transaction (TX) Management
    • Intro to Spring Transaction Management
      • Overview, Component TX Model, TX Propagation, Declarative Transactions, TransactionManagers
    • Using Spring Transactions
    • Annotation Configured Transactions
      • @Transactional and its settings
    • XML Configured Transactions
      • tx:advice, and tx:attributes
      • Defining the TX advisor
  7. Introduction to Spring Web Integration
    • Integrating Spring with Java EE Web Apps
      • ContextLoaderListener
      • WebApplicationContext
      • Using Spring beans in Wep app controller logic
  8. Overview of Spring Security
    • Overview - Capabilities, Architecture
    • Introduction to Spring Security
      • HTTP Security
      • Method Security
      • Annotation-Based Security
      • Expression-Based Access Control
    • Authentication Providers