Learn your way! Get started

Java EE Programming: Spring 3.0

with expert Greg Matus


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack
  • Power Pack Plus

Release date Release date 5/18/2011
Level Level Advanced
Runtime Runtime 17h 37m
Closed captioning Closed captioning N/A
Transcript Transcript N/A
eBooks / courseware eBooks / courseware Included
Hands-on labs Hands-on labs Included
Sample code Sample code Included
Exams Exams Included


Enterprise Solutions
Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

The Spring framework is an application framework that provides a lightweight container that supports the creation of simple-to-complex components in a non-invasive fashion. The Spring flexibility and transparency is congruent and supportive of incremental development and testing. The framework structure supports the layering of functionality such as persistence, transactions, view-oriented frameworks, and enterprise systems and capabilities. Spring makes JavaEE development easier. Spring simplifies common tasks and encourages good design based on programming to interfaces. Spring makes your application easier to configure and reduces the need for many JEE design patterns. Spring puts the OO design back into your JEE application. This Spring course will take an in-depth tour of the basic Spring framework, initially examining concepts such as Inversion of Control and Dependency Injection, and then working with the container and basic components. The improved Spring 3.0 configuration management options centered on the Spring Expression Language (SPEL) is covered. The course then moves into the areas of persistence and transactions, looking at various options including both JDBC and Hibernate. You will then look at options for handling the view portion of MVC web architecture.

Prerequisites

This an intermediate- level Spring 3.0 training course, designed for developers who need to understand how and when to use Spring in Java and JEE applications. You should have practical basic Java development experience.

Learning Paths

This course is part of the following LearnNowOnline SuccessPaths™:
Java Development

Meet the expert

Greg Matus Greg Matus combines his practical programming skills and mentoring excellence to develop the highest quality educational programs available. His technical focus includes developing programs and projects focused around advanced application development, performance, and tuning skills and technologies. His specialties include Java, advanced J2EE / JEE, AJAX, XML, Web Services, JSP, SQL, JDBC and Database topics, Oracle, Eclipse, WebLogic, and more.


Course outline



Module 1

Introduction (01:04:05)
  • Introduction (04:24)
  • Introduction to Spring (02:44)
  • Benefits of Spring (04:54)
  • Drawbacks: Traditional Java EE (03:28)
  • Spring Framework: Goals (02:50)
  • Nature of POJOs (01:42)
  • Spring Architecture (00:45)
  • Key Features of Spring (02:35)
  • Core Spring Principles (01:10)
  • Configuring Spring (01:56)
  • POJOs and Interfaces: Problems (01:25)
  • POJOs and Interfaces (03:25)
  • Spring is an Object Factory (06:46)
  • Dependency Injection (02:26)
  • Dependency Injection: Example (08:50)
  • Complete Example (01:25)
  • Demo: Intro to Spring (12:17)
  • Summary (00:56)

Module 2

Spring Configuration (32:55)
  • Introduction (00:59)
  • Dependency Injection & Testing (01:58)
  • Testing with Mocks (01:40)
  • Testing with Mocks: UML Diagram (01:42)
  • Spring Architecture (00:11)
  • Spring Jars (01:07)
  • Demo: Spring Jars (00:43)
  • Spring DI Container (03:40)
  • Initializing the Container (02:01)
  • Accessing Beans: Container (01:30)
  • Demo: Accessing Beans (01:16)
  • Configuring Objects: Spring (01:44)
  • XML Schema and DTD (00:50)
  • Core Structure of the XML File (01:28)
  • Defining and Naming Beans (02:14)
  • Typical Bean Creation (01:24)
  • Constructor Argument Matching (01:10)
  • Distinguishing ref and value (01:31)
  • Allowed conversions for value (01:38)
  • Examples of ref and value (03:41)
  • Summary (00:18)
Property Injection (29:17)
  • Introduction (00:54)
  • DI: Bean Properties (02:26)
  • DI: Using Nested Syntax (01:30)
  • Special Handling for Collections (00:35)
  • Collection Based Properties (01:12)
  • Initializing to a Null Value (00:21)
  • Factories: Adv. Bean Creation (01:17)
  • Static Bean Factory (02:36)
  • Method Factories (02:16)
  • Bean Creation - Singletons (01:02)
  • Managed Bean Lifecycle (02:34)
  • Validation of Bean Dependencies (01:15)
  • Autowiring (02:47)
  • Demo: Property Injection (07:12)
  • Summary (01:14)

Module 3

Config: Advanced Features (27:33)
  • Introduction (00:36)
  • init and destroy Methods (01:11)
  • Other Advanced Features (01:11)
  • Spring 3 Annotations (00:58)
  • @Resource (00:54)
  • @Autowired (00:31)
  • @Component (00:46)
  • @Component Specializations (00:40)
  • @Required (00:35)
  • Demo: Config Advanced Features (19:29)
  • Summary (00:38)
Config: Additional Features (36:26)
  • Introduction (00:53)
  • Overview of Factory Beans (02:40)
  • XSL Transform: Factory Beans (01:42)
  • Configuring the XSLFactory Bean (01:03)
  • Spring: Pre-built Factory Beans (00:45)
  • Bean Definition Re-use (03:50)
  • Using Property Files (01:30)
  • PropertyPlaceholderConfigurer (03:09)
  • Custom Property Editors (03:45)
  • Bean Post-Processors (01:46)
  • Demo: Additional Features (15:04)
  • Summary (00:13)

Module 4

AOP (17:37)
  • Introduction (01:01)
  • Spring Architecture (00:13)
  • Aspect Oriented Programming (00:36)
  • What is AOP (02:54)
  • Cross Cutting Concerns (00:39)
  • What is an Aspect (01:48)
  • Aspects and Decoupling (02:33)
  • Structure of Proxy - version 1 (00:22)
  • Structure of Proxy - version 2 (00:49)
  • Tradeoffs Between Styles (01:40)
  • Some AOP Vocabulary (01:22)
  • Cross Cutting Concerns (00:47)
  • Why is AOP so Important (01:35)
  • Summary Crosscutting Concerns (00:52)
  • Summary (00:21)
AOP in Spring (27:56)
  • Introduction (00:30)
  • Spring: AOP in a Nutshell (04:51)
  • Complete AOP HelloWorld Example (01:15)
  • The Simplest Advice (01:46)
  • Demo: Ice Cream (02:56)
  • Complete Advice & Config File (03:17)
  • Demo: Adding Welcome Advice (12:10)
  • Summary (01:08)

Module 5

More About Interceptors (48:07)
  • Introduction (00:29)
  • MethodBeforeAdvice (03:35)
  • The Method Class (01:13)
  • Three Technologies of Weaving (01:57)
  • The Generated Proxy Object (02:23)
  • The Cost of Using a Proxy (01:35)
  • Aspects/Proxies Costs/Benefits (02:21)
  • Four Kinds of Advice (01:53)
  • Spring Advice Types (02:16)
  • MethodBeforeAdvice (01:38)
  • AfterReturningAdvice (01:07)
  • ThrowsAdvice (04:22)
  • Demo: Interceptors (22:58)
  • Summary (00:14)
Method Interceptor (38:40)
  • Introduction (00:49)
  • MethodInterceptor (03:01)
  • ExampleInterceptor (04:30)
  • Demo: Around Advice (10:01)
  • Demo: Initial Test (08:33)
  • Demo: Debugging (11:28)
  • Summary (00:16)

Module 6

Join Points and Pointcuts (47:59)
  • Introduction (00:33)
  • Joinpoints (03:22)
  • Pointcuts - Specify Joinpoints (02:00)
  • Where do Joinpoints fit (01:07)
  • AOP Definitions (01:54)
  • PointCuts (07:32)
  • Static PointCuts (01:33)
  • Dynamic PointCuts (02:56)
  • Pre-built Spring PointCuts (03:25)
  • Regular Expression PointCuts (04:02)
  • Custom PointCut Implementations (01:35)
  • Pointcuts util class (02:01)
  • The Advisor (02:58)
  • DefaultPointcutAdvisor (02:23)
  • RegexpMethodPointcutAdvisor (00:39)
  • Overview of the AOP Components (00:44)
  • Proxy Configuration (00:49)
  • ProxyConfig (00:36)
  • ProxyFactoryBean (03:01)
  • BeanNameAutoProxyCreator (01:42)
  • DefaultAdvisorAutoProxyCreator (01:46)
  • Overview of the AOP Components (00:52)
  • Summary (00:18)
IOC and Annotation Based AOP (54:27)
  • Introduction (00:22)
  • Demo: Adding Statistics (09:40)
  • Demo: Search Statistics Advice (10:41)
  • Demo: BeanNameAutoProxyCreator (20:59)
  • Demo: Test Client (12:13)
  • Summary (00:30)

Module 7

Annotations (02:06:39)
  • Introduction (00:42)
  • Relationship to AspectJ (01:24)
  • Review of Java Annotations (04:19)
  • Example: Java Annotation (04:40)
  • Using Annotations (01:38)
  • Annotations: More Info (00:49)
  • Three Forms of Annotations (03:20)
  • Annotations to Create Aspects (09:41)
  • The Spring Config File (08:01)
  • Intro to Annotation Syntax (02:39)
  • Other Advice Types (01:35)
  • ProceedingJoinPoint (05:12)
  • Around advice (08:09)
  • More About Aspect Parameters (01:41)
  • Using args(argName) (07:18)
  • 3 Types of Pointcuts (02:34)
  • Details of: name-pattern (02:36)
  • Examples: execution Pointcut (02:56)
  • Examples: bean(beanName) (00:54)
  • Pointcut Pattern Expressions (13:00)
  • Demo: Annotations (43:07)
  • Summary (00:14)

Module 8

AOP Annotations (36:18)
  • Introduction (00:34)
  • Advice: Introductions (00:45)
  • What is an Introduction (02:41)
  • Introduction: Example (01:28)
  • Difference from Around Advice (02:18)
  • Complete Working Example (02:26)
  • Example: The Lockable Interface (00:57)
  • Example: Underlying POJO (00:51)
  • Example: Client Code (02:41)
  • Example: What are the Challenges (01:23)
  • Generated Proxy Object Structure (01:12)
  • Create a LockableImpl (00:33)
  • The Aspect Itself (01:05)
  • Overview of the Code (00:29)
  • Declaring the Aspect: mixin (03:58)
  • Declaring the Aspect: interaction (01:03)
  • Declaring the Interaction (00:51)
  • @Before Interaction Behavior (00:38)
  • @Before Aspect Declaration (01:52)
  • Pointcut Specification (01:00)
  • IsLockable Annotation (01:48)
  • Spring Config File (02:47)
  • Introduction Advice (02:20)
  • Summary (00:27)
Persistence In Spring (01:10:34)
  • Introduction (00:32)
  • Spring Architecture (02:12)
  • DAO Implementations (06:06)
  • Transaction Support (05:30)
  • Continued: Transaction Support (06:06)
  • Isolation Level Concepts (06:49)
  • Propagation Behavior (05:09)
  • Transaction Config (00:56)
  • Programmatic Transaction (07:32)
  • Declarative Transactions (01:36)
  • Benefits of Declarative Trans (06:23)
  • Two Forms of Declarative Trans (10:42)
  • The Java Code is Simple (05:12)
  • Example: Declarative Annotations (05:23)
  • Summary (00:19)

Module 9

Spring JDBC (02:04:46)
  • Introduction (00:32)
  • Overview (04:38)
  • Switching Between DataSources (08:01)
  • JDBC DAO Implementation (04:41)
  • The jdbcTemplate (06:01)
  • RowMapper (06:30)
  • RowCallbackHandler (08:46)
  • Sending SQL (10:49)
  • Exception Handling (05:10)
  • Operation Classes (10:20)
  • Demo: Spring JDBC (26:44)
  • Demo: Extending jdbcDao (32:01)
  • Summary (00:29)

Module 10

Spring MVC (01:00:51)
  • Introduction (00:37)
  • Spring MVC (01:00)
  • Overview of Spring MVC (04:16)
  • The DispatcherServlet (06:31)
  • The WebApplicationContext (03:01)
  • Workflow of Request Handling (03:25)
  • Mapping URLs to Controllers (01:37)
  • Using Handler Mappings (07:56)
  • Handler Interceptors (03:23)
  • Review of Architecture (02:12)
  • ModelAndView & View (01:57)
  • The View in ModelAndView (10:03)
  • Demo: Spring MVC (14:16)
  • Summary (00:30)

Module 11

Spring MVC Views (01:58:34)
  • Introduction (00:51)
  • ModelAndView & View (03:28)
  • A Custom View Example (04:26)
  • ViewResolvers (09:51)
  • Controllers (04:45)
  • Using the MultiActionController (05:06)
  • Handling Form Requests (02:43)
  • Demo: MVC Views (18:18)
  • Demo: Annotations Approach (27:19)
  • Demo: Debugging (20:54)
  • Demo: Enabling View (20:23)
  • Summary (00:25)

Module 12

Spring MVC Form Handling (01:34:08)
  • Introduction (00:51)
  • Spring MVC Annotations (02:14)
  • ClassPath Scanning (01:33)
  • annotation-driven (01:33)
  • Annotation Controller Mapping (01:13)
  • How @RequestMapping Works (02:19)
  • MVC Handler Method Parameters (01:19)
  • The Form (03:44)
  • The Spring Form Tags (05:58)
  • Using a PropertyEditor (04:23)
  • Adding Validation (08:30)
  • Additional Functionality (10:46)
  • Demo: Spring MVC Form Handling (30:09)
  • Demo: Implement AddDVD (19:03)
  • Summary (00:25)