Introducing Spring Framework: A Primer

Book description

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.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Dedication
  5. Contents at a Glance
  6. Contents
  7. About the Author
  8. About the Technical Reviewer
  9. Acknowledgments
  10. Introduction
  11. Part 1: Spring Framework Basics
    1. Chapter 1: Your First Spring Application
      1. Pre-Requirements
        1. Hello World Example
        2. Running the Hello World Application
        3. Spring Boot: Even Easier
        4. Running the Spring Boot Application
        5. Spring Boot, à la Groovy
      2. Summary
    2. Chapter 2: Working with Classes and Dependencies
      1. My Spring Application – My Documents
        1. Requirements of My Documents
        2. Defining Classes and Dependencies
      2. Using the Spring Framework
      3. Spring Framework and Dependency Injection
      4. Summary
    3. Chapter 3: Applying Different Configurations
      1. My Documents XML Configuration
      2. Using Spring Annotations
      3. Spring Stereotypes
      4. Using the Java Bean Configuration
      5. Using the GroovyBeanDefinitionReader Class
      6. Which Configuration to Choose?
      7. Summary
    4. Chapter 4: Using Beans Scopes
      1. Scopes
      2. Using the @Scope Annotation
      3. Using Bean Scopes in the New GroovyBeanDefinitionReader Context
      4. Summary
    5. Chapter 5: Working with Collections and Custom Types
      1. List, Map, and Properties
      2. Collections in Your XML Configuration
      3. Merging Collections
      4. Summary
    6. Chapter 6: Using Resource Files
      1. Using Resources
      2. Using Property Files
      3. Using a Different Language: Do You Speak Spanish?
      4. Summary
    7. Chapter 7: Testing Your Spring Application
      1. Testing with Annotations
      2. Using Profiles
      3. More Test Annotations
      4. Summary
  12. Part 2: Spring Framework
    1. Chapter 8: Give Advice to Your Spring Application
      1. Advice to My Documents
      2. AOP to the Rescue
        1. AOP Concepts
        2. Before Advice
        3. After Advice
        4. Around Advice
        5. After Throwing Advice
      3. AOP with Annotations
      4. Summary
    2. Chapter 9: Adding Persistence to Your Spring Application
      1. Adding Persistence
      2. Embedding a Database
      3. A New Way to Collect Data: JdbcTemplate and RowMapper
      4. Summary
    3. Chapter 10: Showing Your Spring Application on the Web
      1. Persistence Layer
      2. Spring MVC
      3. Internationalization: i18n
      4. Summary
    4. Chapter 11: Integrating Your Spring Application with External Systems
      1. Java Message Service
      2. Spring JMS
      3. RabbitMQ and Spring Rabbit
      4. Summary
    5. Chapter 12: Exposing a REST API
      1. RESTful
        1. HTTP-GET
        2. HTTP-POST
        3. HTTP-PUT
        4. HTTP-DELETE
      2. Summary
    6. Chapter 13: Adding E-mail and Scheduling Tasks
      1. Sending E-mails
      2. Let’s Talk About Asynchronous Tasks
      3. Let’s Schedule
      4. Summary
  13. Part 3: Spring Framework Advanced
    1. Chapter 14: Using Dynamic Languages
      1. Get More Dynamic
      2. Doing Something Groovy
      3. Using JRuby and Bean Shell
      4. Summary
    2. Chapter 15: Spring Data Within Your Spring Application
      1. Using NoSQL Databases
      2. Implementing the DocumentDAO
      3. Testing MongoDB
      4. A Complete DocumentDAO Test
      5. Summary
    3. Chapter 16: Messaging with Your Spring Application
      1. Using RabbitMQ
        1. RabbitMQ: Exchanges, Bindings, and Queues
        2. Using a XML Marshaller for Message Conversion
      2. Test the Rabbit
      3. Summary
    4. Chapter 17: Be Social and Go Mobile
      1. Using Spring Social
      2. Spring Social Twitter
        1. Registering Your Application in Twitter
        2. Let’s Tweet
      3. Sending Tweets from My Spring Application
      4. Summary
  14. Part 4: Spring I/O
    1. Chapter 18: Spring and Groovy
      1. Let’s Code Groovy
      2. Let’s Test Groovy
      3. DSL Syntax
      4. Summary
    2. Chapter 19: Spring Boot, Simplifying Everything
      1. Spring Boot
      2. Deploying MyDocuments
        1. Creating an Executable Jar
        2. Creating a WAR File
      3. Spring Boot À La Groovy
      4. Summary
    3. Chapter 20: Your First Spring XD Application
      1. Installing Spring XD
        1. Using the Spring XD Distribution
        2. Using OSX Homebrew Installation
      2. Spring XD
        1. Modules
        2. Taps
      3. Using Spring XD with My Documents
      4. Let’s Do Analytics
      5. Summary
    4. Appendix A: Installing Tools
      1. Installing Java
        1. Installing Java for Windows OS
        2. Setting Environment Variables
        3. Installing Java for OS X
      2. Tools for Mac OS X
        1. Installing Homebrew
        2. Installing GVM
      3. Installing Gradle
        1. Installing Gradle on Windows
        2. Installing Gradle on a Mac OS X or Linux
      4. Installing Groovy
        1. Installing Groovy on Windows
        2. Installing Groovy on a Mac OS X or Linux
      5. Installing MongoDB
        1. Installing MongoDB on Windows
        2. Installing MongoDB on a Mac OS X
      6. Installing Apache Active MQ
        1. Installing Apache ActiveMQ on Windows
        2. Installing Apache ActiveMQ on a Mac OS X
      7. Installing RabbitMQ
        1. Installing RabbitMQ on Windows
        2. Installing RabbitMQ on a Mac OS X
      8. Installing Spring Boot
        1. Installing Spring Boot on Windows
        2. Installing Spring Boot on a Mac OS X or Linux
      9. Installing Spring XD
        1. Installing Spring XD on Windows
        2. Installing Spring XD on a Mac OS X
      10. Summary
  15. Index

Product information

  • Title: Introducing Spring Framework: A Primer
  • Author(s):
  • Release date: June 2014
  • Publisher(s): Apress
  • ISBN: 9781430265337