Learning Patterns: Your Global Source for Java Training, Mentoring, and Consulting
Home | About LearningPatterns | Our Services | Contact Us | Printer Friendly Link

Course Description:

Fast Track to Spring 2.x

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 (usually XML) 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), integration with Java Web technologies (MVC module), security, transactions, and more.

This course is a completely new course based on the Spring 2.0 and 2.5 releases.  It starts with the basics of Spring and in-depth coverage on using the powerful capabilities of the Core module to reduce coupling, increase flexibility and ease the maintenance and testing of your applications. 

The course goes on to cover all the important capabilities of Spring 2.0 / 2.5, including using Spring to simplify the creation of a persistence layer with JDBC and/or persistence frameworks like Hibernate, and using Spring's Aspect Oriented Programming (AOP) to program cross-cutting concerns such as transactions and security. 

The course includes a brief introduction to Spring's Web MVC - - a Web framework based on the powerful Model-View-Controller pattern.  This module covers the basics of Spring MVC, and how it supports organizing your Web applications in a highly structured, loosely coupled manner.

The course also includes a brief introduction to Spring Security which was integrated into the Spring project when Spring 2.5 was released. This module includes an overview of the Spring Security architecture, and how to use it to secure both Web application requests and bean invocations

This course is hands on with labs to reinforce all the important concepts.  It will enable you to build working Spring applications, and give you an understanding of the important concepts and technology in a very short time.

Course Information

Duration: 3 days

Hands-on: 50% hands-on, 50% lecture

Supported Platforms: Spring 2.5, Eclipse, IBM RAD, IntelliJ

Skills Gained:

Course Details:

Session 1:  Introduction

  • Overview of Spring Technology
    • Shortcomings of Java EE, Spring Architecture
  • Spring Introduction
    • Managing Beans, Configuration Metadata, The Spring Container, IoC, DI
  • Dependencies and Dependency Injection (DI)
    • Dependency Inversion, Dependency Injection (DI) in Spring, DI Configuration, Advantages

Session 2:  More about Bean Properties

  • Working with Properties
    • Configuring Value Properties, Property Conversions, Setter / Constructor Injection
  • Collection Valued Properties
    • Configuring  and Using <list>, <set>, <map>, <props>
  • Additional Capabilities
    • Factory Methods, Bean Aliases, Definition Inheritance (Parent Beans), Autowiring

Session 3:  The Spring Container and API

  • ApplicationContext
    • ClassPathXmlApplicationContext, FileSystemXmlApplicationContext, Constructors, Usage
  • Resource Access
    • Overview, Resource Implementations
  • Bean Scope and Lifecycle
    • Bean Scope Defined, Configuring, Inner Beans, Bean Creation Lifecycle, Using the Lifecycle Interfaces (e.g. BeanFactoryAware), BeanPostProcessor, Even Handling
  • MessageSources
    • Defining and Using Resource Bundles, Localization/I18N
  • Annotation Driven Configuration
    • @Required, RequiredAnnotationBeanPostProcessor
    • Dependency Injection with @Resource
    • @Component, Auto-Detecting Beans, Other Stereotypes

Session 4:  Database Access with Spring

  • Issues with JDBC
    • Examination of Typical JDBC Flow
  • Introduction to Spring DAO Support
    • Spring Database API, (Simple)JdbcTemplate,  (Simple)JdbcDaoSupport, DataSources,
    • Working With and Configuring, <list>, <set>, With Bean Refs, <map>, <props>
  • 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
    • HibernateTemplate, LocalSessionFactoryBean, Hibernate Configuration, HibernateDaoSupport,
    • Configuring a Hibernate DAO
    • HibenateTemplate Query Methods, Using HibernateCallback, Using Contextual Sessions

Session 5:  Aspect Oriented Programming (AOP)

  • Overview of AOP
    • AOP Basics, Aspect, Joinpoint, Advice, Pointcut
  • Introduction to Spring AOP
    • Capabilities, New 2.0 Configuration (XML and @AspectJ), Weaving, Joinpoints
  • Using Aspects
    • XML Configuration with <aop:>
    • Defining Advice, Configuring Pointcuts, Targets and Proxies
    • AspectJ Pointcuts, Autoproxies
  • Using @AspectJ Annotations
    • @ApsectJ Annotations, Declaring Advice

Session 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
    • new <tx:*> elements, Configuring tx:advice, and tx:attributes
    • Defining the TX advisor

Session 7:  Overview of Spring Web MVC

  • Overview - Capabilities, Architecture
  • Introduction to Spring MVC
    • DispatcherServlet, Handlers, HandlerMappings
    • Command Controllers, Commands, View Resolvers
  • Forms
    • Spring Form Tags, Writing/Processing Forms

Session 8:  Overview of Spring Security

  • Overview - Capabilities, Architecture
  • Introduction to Spring Security
    • HTTP Security
    • Method Security
  • Authentication Providers
Home | About LearningPatterns | Our Services | Legal | Contact Us