Description
In this course, you will :
- Understand the fundamentals of the Java Spring framework
- Learn how to develop web and database applications with Spring
- Understand the basics of Hibernate for SQL-free database connectivity
Syllabus :
1. Basic Bean Configuration
- Constructor Arguments
- Setting Bean Properties
- Dependency Injection
- Bean Scope
- Init and Destroy Methods
- Factory Beans and Methods
- The P Namespace
- Setting List Properties
- Lists of Beans
- Inner Beans
- Property Maps
- Arbitrary Maps as Bean Properties
2. Autowiring
- Autowiring by Type
- Autowiring by Name
- Autowiring by Constructor
- Default Autowiring
- Removing Autowire Ambiguities
3. Wiring with Annotations
- Adding Support for Annotation-Based Wiring
- The "Autowired" Annotation
- Optional Beans
- Using Qualifiers
- The Resource Annotation (JSR-250)
- Annotation-Based Init and Destroy Methods
- The Inject annotation (JSR-330)
- Automatic Bean Discovery
- Setting Property Values via Annotations
4. Spring Expression Language (SPEL)
- Using SPEL with Annotations
- Some useful SPEL Operators
5. Working with Databases
- Creating a Database with MySQL
- Using Property Files
- Implementing the DAO Pattern
- Downloading a Connector Jar
- Configuring Connection Pooling with Apache DBCP
- JDBC Templates
- Querying the Database
- Database Exceptions
- Named Parameters
- Update Statements
- Getting Placeholder Values from Beans
- Adding an Update Method to the DAO
- Batch Updates: Prepared Statements
- Transactions
6. Web Application Basics with Spring MVC
- A Basic Non-Spring Web App
- Bringing in Maven
- The Dispatcher Servlet
- Adding a Controller
- View Resolvers
- Adding Data to the Session
- Using Spring Data Models
- Using JSTL (JSP Standard Tag Library)
- Configuring a JNDI Data Source
- Bringing in the DAO Code
- Loading Bean Containers with ContextLoaderListener
- Creating a Datasource Bean
- Adding a Service Layer
- Adding a New Controller
- Getting URL Parameters
7. Working with Web Forms
- Creating a Form
- Getting Form Values
- Adding CSS Styles
- Serving Static Resources
- Adding Hibernate Form Validation Support
- More Form Validation Tags
- Making Forms Remember Values
- Displaying Form Validation Errors
- Creating a Custom Validation Annotation
- Hooking Up the Controller and Database Code
- Exception Handling in Spring MVC
8. Aspect-Oriented Programming (AOP)
- A Base Project for Working with Aspects
- A Simple Aspect Example
- Annotation-Based Aspects
- Wildcards in Pointcut Expressions
- Advice Types: After, Around and Others
- Proxies, Interfaces and Aspects
- The “Within” Pointcut Designator
- “This”, “Target” and Matching Subpackages
- Annotation-Specific PCDs
- The “Bean” PCD
- The “Args” PCD
- Getting Target Method Arguments
- Getting Arguments Using “Args”
- Combining Pointcuts
- Introductions: Adding Functionality Using Aspects
9. Spring Security and Managing Users
- Servlets Filters: A Review
- Adding a Spring Security Filter
- Adding a Spring Login Form
- Serving Static Resources: Access Rules
- Customising the Login Form
- Displaying Login Errors
- Authorising Users from a Database
- Adding a “Create Account” Form
- Making the “Create Account” Form Work
- Adding Validation to the User Form
- Dealing with Duplicate Usernames
- Storing Validation Messages in a Property File
- Using JQuery to verify the password
- Using Property File Values in JSPs
- Adding a Logout Link
- Working With Roles
- Outputting Text Based on Authentication Status
- Row Mapping with BeanPropertyRowMapper
- Using Custom Authentication Queries: Case Sensitive Usernames
- Method-Level Access Control
- Catching Secure Annotation Violations
- Adding “Remember Me” Functionality
- Encrypting Passwords
10 Apache Tiles and Spring MVC
- Tiles Dependencies
- “Hello World” Apache Tiles
- Adding Headers and Footers
- Formatting the Offers Application
- Creating Tiles from JSP Files
11. Logging and Testing
- Adding Log4J Logging
- Resolving Logging Conflicts
- Using Logging
- Creating a MySQL Test Database
- Using Spring Profiles
- Creating JUnit Tests
- Coding the JUnit DAO Tests
12. Improving the "Offers" Web Application
- Normalizing the Database
- Querying Tables with Foreign Keys and Refactoring the DAO Layer
- Refactoring the Web Layer
- Getting the Username of the Logged-In User
- Deleting from Tables with Foreign Keys and a Little Bugfix
- Custom RowMappers
- Conditional Database-Dependent Text in JSPs
- Editing Database Objects with Forms
- Multiple Form Submits and Optional Parameters
- Adding a Confirm Dialog with JQuery
13. Hibernate
- Introducing Hibernate
- A Simple Hibernate Query
- Saving Objects
- Validation Groups and Password Encryption
- Translating Hibernate Exceptions to Spring Exceptions
- Queries with Criteria
- Mapping Many-to-One Relationships
- Restrictions on Joined Tables
- Multiple Criteria
- Updating Objects
- Deleting Objects
- Completing the Offers DAO
14. Spring Webflow
- Creating a Flow Registry
- Hooking Up URLs to Webflows
- Connecting Webflow and Apache Tiles
- Creating a “Messages” Table
- Creating a “Message” Class
- Adding a Message Form
- Transitions
- Action States
- Linking to Webflows
- Validating Webflow Forms
- Accessing User Details in Webflow
15. JSON and AJAX
- Creating a JSON Server
- Updating Dynamically with jQuery
- Generating Pages with Javascript
- Adding Reply Boxes
- Showing and Hiding the Reply Forms
- Stopping and Starting the Timer
- Getting the Text from the Right TextArea
- Posting Back JSON Data
- Giving the User Feedback
- Sending Email with Springmail