E-Book Overview
Introducing Spring Framework is your hands-on guide to learning to build applications using the Spring Framework. The book uses a simple My Documents application that you will develop incrementally over the course of the book and covers: • How to programmatically configure the Spring container and beans • How to use annotations for dependency injection • How to use collections and custom types • How to customize and configure bean properties and bean lifecycle interfaces • How to handle metadata using XML, annotations, and the Groovy bean reader • How to use the new Spring Boot and Spring XD After reading this book, you will have all you need to start using the Spring Framework effectively.
E-Book Content
THE EXPERT’S VOICE® IN SPRING
For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them.
Contents at a Glance About the Author ................................................................................................................ xv About the Technical Reviewer .......................................................................................... xvii Acknowledgments ............................................................................................................. xix Introduction ....................................................................................................................... xxi
N Part 1: Spring Framework Basics................................................................. 1 N Chapter 1: Your First Spring Application ...........................................................................3 N Chapter 2: Working with Classes and Dependencies ......................................................13 N Chapter 3: Applying Different Configurations ..................................................................25 N Chapter 4: Using Beans Scopes .......................................................................................45 N Chapter 5: Working with Collections and Custom Types .................................................53 N Chapter 6: Using Resource Files ......................................................................................61 N Chapter 7: Testing Your Spring Application .....................................................................75
N Part 2: Spring Framework .......................................................................... 87 N Chapter 8: Give Advice to Your Spring Application..........................................................89 N Chapter 9: Adding Persistence to Your Spring Application ...........................................111 N Chapter 10: Showing Your Spring Application on the Web ............................................133 N Chapter 11: Integrating Your Spring Application with External Systems ......................145 N Chapter 12: Exposing a REST API ..................................................................................169 N Chapter 13: Adding E-mail and Scheduling Tasks .........................................................183
v
N CONTENTS AT A GLANCE
N Part 3: Spring Framework Advanced........................................................ 193 N Chapter 14: Using Dynamic Languages .........................................................................195 N Chapter 15: Spring Data Within Your Spring Application ..............................................203 N Chapter 16: Messaging with Your Spring Application ...................................................217 N Chapter 17: Be Social and Go Mobile ............................................................................231
N Part 4: Spring I/O ...................................................................................... 251 N Chapter 18: Spring and G