Introduction to Spring Framework
Revision: TE2410_20071015
(7.18 KB) View, Download, or Print Catalog as a PDF.
Course Length:
3 Days
Course Description:
This course introduces the Spring Framework, the leading full-stack framework for Java EE applications. Topics covered include the Spring containers, dependency injection, data validation, aspect-oriented programming, the JDBC template, the Hibernate template, and declarative transaction management. A Web application is also presented to illustrate use of the Spring Web MVC framework.
Who Should Attend:
Java developers and architects who wish to explore a popular, open-source alternative to traditional Java EE programming
Benefits of Attendance:
Upon completion of this course, students will be able to:
- Describe the seven component modules of the Spring Framework
- Understand the basic philosophies of Spring
- Explain the purpose and benefits of dependency injection
- Configure beans in a Spring configuration file
- Use setter and constructor injection with Spring beans
- Create property files for error messages and to support internationalization
- Write validators and property editors for user-defined data types
- Understand basic concepts of aspect-oriented programming
- Use the JDBC template to simplify database access
- Use the Hibernate template to integrate Hibernate and Spring
- Configure declarative transaction management
- Create Web applications using the Model-View-Controller architecture
- Write forms and controllers for Spring Web applications
Prerequisites:
Strong Java programming skills and exposure to Java EE technology
Course Outline:
- Chapter 1: Introduction to Spring
- What is Spring?
- Overview of the Spring Framework
- Spring Philosophies
- Spring Documentation
- Java 5 Language Features
- Chapter 2: A First Look at Spring
- A Simple Example
- Wiring Beans
- Configuring a Properties File
- Schema-Based Configuration
- Chapter 3: Beans and Containers
- Spring Containers
- Spring Configuration File
- Spring Beans
- Using the Container
- The BeanFactory Interface
- Singleton vs. Prototype
- Bean Naming
- Dependency Injection
- Setter Injection
- Constructor Injection
- Chapter 4: The Application Context
- The ApplicationContext Interface
- Accessing Application Components
- Accessing Resources
- Internationalization with MessageSource
- Application Events
- Chapter 5: Data Validation and Conversion
- The Validator Interface
- The Errors Interface
- The ValidationUtils Class
- Validator Example
- Testing the Validator
- Property Editors
- Custom Property Editors
- Chapter 6: Aspect-Oriented Programming
- Aspect-Oriented Programming
- AOP Concepts
- AOP Proxies
- The AOP Alliance
- Types of Advice
- AOP Example
- Introductions
- Chapter 7: Using JDBC with Spring
- A Simpler Approach
- Working with the HSQLDB Database
- The JdbcTemplate Class
- Exception Translation
- Updating with the JdbcTemplate
- Queries using the JdbcTemplate
- Mapping Results to Java Objects
- Chapter 8: Using Hibernate with Spring
- What is Hibernate?
- Hibernate Sessions
- The HibernateTemplate
- Sample Class and Mapping File
- Creating and Saving a New Entity
- Locating an Existing Entity
- Updating an Existing Entity
- Hibernate Query Language
- Executing Queries
- Chapter 9: Transaction Management
- Spring Transaction Support
- Declarative Transaction Implementation
- Configuring Rollbacks
- Transaction Isolation
- Transaction Propagation
- Transaction Example
- Declarative Transaction Configuration
- Testing Transaction Propagation
- Chapter 10: Spring Web MVC
- Spring Web MVC
- The DispatcherServlet
- Controllers
- A Simple View Page
- Configuring the Controller
- Adding a View Resolver
- Adding a Message Bundle
- Adding Business Classes
- Adding Test Data
- Accessing a Database
- Adding a Form
- Updating the Database
- Integrating Hibernate
- Appendix A: Resources
- Resources
- Appendix B: Spring IDE
- Spring IDE
- Adding the Spring Project Nature
- Managing Spring Configuration Files
- Visualizing a Configuration File
- Appendix C: Creating a Spring Project in Eclipse
- Introduction
- Creating a Spring Project
- Configuring the Build Path
- Appendix D: Running the Examples in Eclipse
- Running the Standalone Applications
- Starting the Server
- Running the Web Application
- Modifying the Web Application
- Stopping the Server



