Course Description
Summary
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), integration with Java Web technologies (MVC and Web Flow), security, transactions, and more.This 5-day course is a based on the Spring 3 release. It includes complete coverage of the annotation based approach to configuration and the use of Java-5 capabilities that was first introduced in Spring 2.x, and which has 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.The course starts 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. It goes 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. It includes coverage of advanced capabilities such as using Spring's Aspect Oriented Programming (AOP) to program cross-cutting concerns such as transactions and security. This includes an introduction to Spring Security v3, its architecture, and how to use it to secure both Web application requests and bean invocations.The course includes integration of Spring with Java EE Web applications, an introduction to Spring's Web MVC, and thorough coverage of Spring Web Flow 2 (which is still the latest version available). Spring MVC is a Web framework based on the powerful Model-View-Controller pattern, and the introduction covers the basics of Spring MVC, and how it supports organizing your Web applications in a highly structured, loosely coupled manner. Spring Web Flow 2 is a Spring framework for defining user interface flow in a Web application. The course includes thorough coverage of Web Flow, including an overview of its capabilities and architecture, defining flows, flow variables and actions, the Unified EL, and flow programming. Note that Spring Web Flow 3, which will use annotation-based configuration, is still in a very early development stage.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.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 IBM RAD and IntelliJ.
Outline
Module 1: Overview of Spring TechnologyShortcomings of Java EESpring Architecture Spring Introduction Managing Beans The Spring Container, IoCDI Configuration Metadata - XML @Component Auto-Detecting Beans Dependencies and Dependency Injection (DI) Dependency Inversion Dependency Injection (DI) in Spring, DI Configuration - XML @ Resource
Module 2: More about Bean PropertiesWorking with PropertiesConfiguring Value PropertiesProperty Conversions, Setter / Constructor InjectionSpring Expression Language for ConfigurationCollection Valued PropertiesConfiguring and using lists, sets, etc.Additional CapabilitiesFactory Methods, Bean Aliases, Definition Inheritance (Parent Beans)
Module 3: The Spring Container and APIApplication ContextClass Path Xml Application ContextFile System Xml Application ContextConstructors UsageResource Access - OverviewResource ImplementationsValidationOverviewJSR-303Declarative Validation@Not Null, @Size, @Min, etcConfiguration, InjectionBean Scope and LifecycleBean Scope DefinedConfiguringInner BeansBean Creation LifecycleLifecycle Callbacks, Bean Post ProcessorEvent HandlingMessage SourcesDefining and Using Resource BundlesLocalization/I18NAnnotation Driven ConfigurationStereotypes: @Component, @Service, @Controller, @RepositoryJava EE 5 Annotation SupportDefining Custom AnnotationsAuto wiring @Auto wired on setters, constructures, methods, fieldsInjecting resources like ApplicationContextFine tuning with @QualifierJava Based Bean Metadata (JavaConfig)Overview - code-centric Configuration @ Confguration, @Bean, and @ValueImporting and @ImportAuto wiring in Configuration ClassesMixing XML Configuration and @ConfigurationXML vs Annotation Based ConfigurationOther CapabilitiesSpEL - Spring Expression LanguageValidation
Module 4: Database Access with SpringIssues with JDBC / Typical JDBC FlowIntroduction to Spring DAO SupportSpring Database API, (Simple)Jdbc Template, (Simple)Jdbc Dao Support, Data SourcesWorking With and Configuring, With Bean Refs, Queries and Inserts
Row MapperParameterized Row MapperPassing Argumentsquery For Object Additional API CapabilitiesAdditional query methods Passing Type Argumentsqery For List Fetch SizeMax Rows
Using Spring with Hibernate
Overview of Template Approach,Session Factory configuration
Using Contextual SessionsUsing Spring with JPA Local Entity Manager Factory BeanLocal Container Entity Manager Factory BeanJNDIPersistence Unit Manager
DAO Support - @Persistence Unit, @Persistence Context
Module 5: Aspect Oriented Programming (AOP)
Overview of AOP
AOP Basics Aspect, Joinpoint, Advice, PointcutIntroduction to Spring AOP
CapabilitiesConfiguration (Annotation Based and XML)WeavingJoinpoints
Using Aspects
Defining AdviceConfiguring Pointcuts Targets and ProxiesXML Configuration with
AspectJ Pointcuts, Autoproxies
Using @AspectJAnnotations
@ApsectJ AnnotationsDeclaring Advice
Module 6: Spring Transaction (TX) ManagementIntro to Spring Transaction Management
OverviewComponent TX ModelTX PropagationDeclarative TransactionsTransaction ManagersUsing Spring TransactionsAnnotation Configured Transactions
@Transactional and its settingsXML Configured Transactions
new elementsConfiguring tx:advice, and tx:attributesDefining the TX advisor
Module 7 Introduction to Spring Web Integration
Integrating Spring with Java EE Web AppsContext Loader ListenerWeb Application ContextUsing Spring beans in WEb app controller logic
Module 8: Overview of Spring Security
OverviewCapabilities ArchitectureIntroduction to Spring SecurityHTTP Security
MethodSecurity
Annotation-BasedSecurity
Expression-BasedAccess Control
Authentication Providers
Module 9: Spring Web Flow
Defining FlowsXML Flow DefinitionLanguage
Flows, States, and TransitionsAccessing Flows in Web PagesExiting Flows - flow Redirect and external RedirectConfiguring Web Flow - Flow Executor, Flow Registry,Integration with Spring MVCWorking with Data - Flow Instance Variables, Flow InputsView Pages and Model BindingFlow Actions - evaluate, set, and render