With over 3 Million users/developers, Spring Framework is the leading ''out of the box'' Java framework. Spring addresses and offers simple solutions for most aspects of your Java/Java EE application development, and guides you to use industry best practices to design and implement your applications
Spring Recipes: A Problem-Solution Approach
✍ Scribed by Gary Mak
- Publisher
- Apress
- Year
- 2008
- Tongue
- English
- Leaves
- 736
- Category
- Library
No coin nor oath required. For personal study only.
✦ Synopsis
Book by Mak, Gary
✦ Table of Contents
Title Page
Copyright Page
Contents at a Glance
Table of Contents
About the Author
About the Technical Reviewers
Acknowledgments
Introduction
Who This Book Is For
How This Book Is Structured
Conventions
Prerequisites
Downloading the Code
Contacting the Author
PART 1 Core
CHAPTER 1 Inversion of Control and Containers
1-1.Using a Container toManageYour Components
Problem
Solution
How It Works
Separating Interface from Implementation
Employing a Container
1-2.Using a Service Locator to Reduce Lookup Complexity
Problem
Solution
How It Works
1-3. Applying Inversion of Control and Dependency Injection
Problem
Solution
How It Works
1-4.Understanding Different Types of Dependency Injection
Problem
Solution
How It Works
Setter Injection (Type 2 IoC)
Constructor Injection (Type 3 IoC)
Interface Injection (Type 1 IoC)
1-5. Configuring a Container with a Configuration File
Problem
Solution
How It Works
1-6. Summary
CHAPTER 2 Introduction to Spring
2-1. Introducing the Spring Framework
Introducing Spring’s Modules
Introducing Spring’s Releases
Introducing Spring’s Projects
2-2. Installing the Spring Framework
Problem
Solution
How It Works
Installing JDK
Installing a Java IDE
Downloading and Installing Spring
Exploring Spring’s Installation Directory
2-3. Setting Up a Spring Project
Problem
Solution
How It Works
Setting Up the Classpath
Creating the Bean Configuration File
Using Beans from the Spring IoC Container
2-4. Installing Spring IDE
Problem
Solution
How It Works
2-5.Using Spring IDE’s Bean-Supporting Features
Problem
Solution
How It Works
Creating a Spring Project
Creating a Spring Bean Configuration File
Viewing Spring Beans in Spring Explorer
Viewing Spring Beans in Spring Beans Graph
Using Content Assist in Bean Configuration Files
Validating Bean Configuration Files
Searching Spring Beans
2-6. Summary
CHAPTER 3 Bean Configuration in Spring
3-1. Configuring Beans in the Spring IoC Container
Problem
Solution
How It Works
Creating the Bean Class
Creating the Bean Configuration File
Declaring Beans in the Bean Configuration File
Defining Bean Properties by Shortcut
3-2. Instantiating the Spring IoC Container
Problem
Solution
How It Works
Instantiating a Bean Factory
Instantiating an Application Context
Getting Beans from the IoC Container
3-3. Resolving Constructor Ambiguity
Problem
Solution
How It Works
3-4. Specifying Bean References
Problem
Solution
How It Works
Specifying Bean References for Setter Methods
Declaring Inner Beans
3-5. Checking Properties with Dependency Checking
Problem
Solution
How It Works
Checking Properties of the Simple Types
Checking Properties of the Object Types
Checking Properties of All Types
Dependency Checking and Constructor Injection
3-6. Checking Properties with the @Required Annotation
Problem
Solution
How It Works
3-7. Auto-Wiring Beans with XML Configuration
Problem
Solution
How It Works
Auto-Wiring by Type
Auto-Wiring by Name
Auto-Wiring by Constructor
Auto-Wiring by Auto-Detection
Auto-Wiring and Dependency Checking
3-8. Auto-Wiring Beans with @Autowired and @Resource
Problem
Solution
How It Works
Auto-Wiring a Single Bean of Compatible Type
Auto-Wiring All Beans of Compatible Type
Auto-Wiring by Type with Qualifiers
Auto-Wiring by Name
3-9. Inheriting Bean Configuration
Problem
Solution
How It Works
3-10.Defining Collections for Bean Properties
Problem
Solution
How It Works
Lists, Arrays, and Sets
Maps and Properties
Merging the Collection of the Parent Bean
3-11. Specifying the Data Type for Collection Elements
Problem
Solution
How It Works
3-12.Defining Collections Using Factory Beans and the Utility Schema
Problem
Solution
How It Works
Specifying the Concrete Class for Collections
Defining Stand-Alone Collections
3-13. Scanning Components from the Classpath
Problem
Solution
How It Works
Scanning Components Automatically
Filtering Components to Scan
Naming Detected Components
3-14. Summary
CHAPTER 4 Advanced Spring IoC Container
4-1. Creating Beans by Invoking a Constructor
Problem
Solution
How It Works
4-2. Creating Beans by Invoking a Static Factory Method
Problem
Solution
How It Works
4-3. Creating Beans by Invoking an Instance Factory Method
Problem
Solution
How It Works
4-4. Creating Beans Using Spring’s Factory Bean
Problem
Solution
How It Works
4-5.Declaring Beans from Static Fields
Problem
Solution
How It Works
4-6.Declaring Beans from Object Properties
Problem
Solution
How It Works
4-7. Setting Bean Scopes
Problem
Solution
How It Works
4-8. Customizing Bean Initialization and Destruction
Problem
Solution
How It Works
Implementing the InitializingBean and DisposableBean Interfaces
Annotating the @PostConstruct and @PreDestroy Annotations
4-9.Making Beans Aware of the Container
Problem
Solution
How It Works
4-10. Creating Bean Post Processors
Problem
Solution
How It Works
4-11. Externalizing Bean Configurations
Problem
Solution
How It Works
4-12. Resolving Text Messages
Problem
Solution
How It Works
4-13. Communicating with Application Events
Problem
Solution
How It Works
Defining Events
Publishing Events
Listening to Events
4-14. Registering Property Editors in Spring
Problem
Solution
How It Works
4-15. Creating Custom Property Editors
Problem
Solution
How It Works
4-16. Loading External Resources
Problem
Solution
How It Works
Resource Prefixes
Injecting Resources
4-17. Summary
CHAPTER 5 Dynamic Proxy and Classic Spring AOP
5-1. Problems with Non-Modularized Crosscutting Concerns
Tracing the Methods
Validating the Arguments
Identifying the Problems
5-2.Modularizing Crosscutting Concerns with Dynamic Proxy
Problem
Solution
How It Works
Creating the Logging Proxy
Creating the Validation Proxy
5-3.Modularizing Crosscutting Concerns with Classic Spring Advices
Problem
Solution
How It Works
Before Advices
After Returning Advices
After Throwing Advices
Around Advices
5-4.Matching Methods with Classic Spring Pointcuts
Problem
Solution
How It Works
Method Name Pointcuts
Regular Expression Pointcuts
AspectJ Expression Pointcuts
5-5. Creating Proxies for Your Beans Automatically
Problem
Solution
How It Works
5-6. Summary
CHAPTER 6 Spring 2.x AOP and AspectJ Support
6-1. Enabling AspectJ Annotation Support in Spring
Problem
Solution
How It Works
6-2.Declaring Aspects with AspectJ Annotations
Problem
Solution
How It Works
Before Advices
After Advices
After Returning Advices
After Throwing Advices
Around Advices
6-3. Accessing the Join Point Information
Problem
Solution
How It Works
6-4. Specifying Aspect Precedence
Problem
Solution
How It Works
6-5. Reusing Pointcut Definitions
Problem
Solution
How It Works
6-6.Writing AspectJ Pointcut Expressions
Problem
Solution
How It Works
Method Signature Patterns
Type Signature Patterns
Bean Name Patterns
Combining Pointcut Expressions
Declaring Pointcut Parameters
6-7. Introducing Behaviors to Your Beans
Problem
Solution
How It Works
6-8. Introducing States to Your Beans
Problem
Solution
How It Works
6-9.Declaring Aspects with XML-Based Configurations
Problem
Solution
How It Works
Declaring Aspects
Declaring Pointcuts
Declaring Advices
Declaring Introductions
6-10. Load-Time Weaving AspectJ Aspects in Spring
Problem
Solution
How It Works
Load-Time Weaving by the AspectJ Weaver
Load-Time Weaving by Spring 2.5 Load-Time Weaver
6-11. Configuring AspectJ Aspects in Spring
Problem
Solution
How It Works
6-12. Injecting Spring Beans into Domain Objects
Problem
Solution
How It Works
6-13. Summary
PART 2 Fundamentals
CHAPTER 7 Spring JDBC Support
7-1. Problems with Direct JDBC
Setting Up the Application Database
Understanding the Data Access Object Design Pattern
Implementing the DAO with JDBC
Configuring a Data Source in Spring
Running the DAO
7-2.Using a JDBC Template to Update a Database
Problem
Solution
How It Works
Updating a Database with a Statement Creator
Updating a Database with a Statement Setter
Updating a Database with a SQL Statement and Parameter Values
Batch Updating a Database
7-3.Using a JDBC Template to Query a Database
Problem
Solution
How It Works
Extracting Data with a Row Callback Handler
Extracting Data with a Row Mapper
Querying for Multiple Rows
Querying for a Single Value
7-4. Simplifying JDBC Template Creation
Problem
Solution
How It Works
Injecting a JDBC Template
Extending the JdbcDaoSupport Class
7-5.Using the Simple JDBC Template with Java 1.5
Problem
Solution
How It Works
Using a Simple JDBC Template to Update a Database
Using a Simple JDBC Template to Query a Database
7-6.Using Named Parameters in a JDBC Template
Problem
Solution
How It Works
7-7.Modeling JDBC Operations As Fine-Grained Objects
Problem
Solution
How It Works
Update Operation Objects
Query Operation Objects
Function Operation Objects
7-8.Handling Exceptions in the Spring JDBC Framework
Problem
Solution
How It Works
Understanding Exception Handling in the Spring JDBC Framework
Customizing Data Access Exception Handling
7-9. Summary
CHAPTER 8 Transaction Management in Spring
8-1. Problems with TransactionManagement
Managing Transactions with JDBC Commit and Rollback
8-2. Choosing a TransactionManager Implementation
Problem
Solution
How It Works
8-3.Managing Transactions Programmatically with the Transaction Manager API
Problem
Solution
How It Works
8-4.Managing Transactions Programmatically with a Transaction Template
Problem
Solution
How It Works
8-5.Managing Transactions Declaratively with Classic Spring AOP
Problem
Solution
How It Works
8-6.Managing Transactions Declaratively with Transaction Advices
Problem
Solution
How It Works
8-7.Managing Transactions Declaratively with the @Transactional Annotation
Problem
Solution
How It Works
8-8. Setting the Propagation Transaction Attribute
Problem
Solution
How It Works
The REQUIRED Propagation Behavior
The REQUIRES_NEWPropagation Behavior
Setting the Propagation Attribute in Transaction Advices, Proxies, and APIs
8-9. Setting the Isolation Transaction Attribute
Problem
Solution
How It Works
The READ_UNCOMMITTED and READ_COMMITTED Isolation Levels
The REPEATABLE_READ Isolation Level
The SERIALIZABLE Isolation Level
Setting the Isolation Level Attribute in Transaction Advices, Proxies, and APIs
8-10. Setting the Rollback Transaction Attribute
Problem
Solution
How It Works
8-11. Setting the Timeout and Read-Only Transaction Attributes
Problem
Solution
How It Works
8-12.Managing Transactions with Load-TimeWeaving
Problem
Solution
How It Works
8-13. Summary
CHAPTER 9 Spring ORM Support
9-1. Problems with Using ORM Frameworks Directly
Persisting Objects Using the Hibernate API with Hibernate XML Mappings
Persisting Objects Using the Hibernate API with JPA Annotations
Persisting Objects Using JPA with Hibernate As the Engine
9-2. Configuring ORM Resource Factories in Spring
Problem
Solution
How It Works
Configuring a Hibernate Session Factory in Spring
Configuring a JPA EntityManager Factory in Spring
9-3. Persisting Objects with Spring’s ORMTemplates
Problem
Solution
How It Works
Using a Hibernate Template and a JPA Template
Extending the Hibernate and JPA DAO Support Classes
9-4. Persisting Objects with Hibernate’s Contextual Sessions
Problem
Solution
How It Works
9-5. Persisting Objects with JPA’s Context Injection
Problem
Solution
How It Works
9-6. Summary
CHAPTER 10 Spring MVC Framework
10-1.Developing a Simple Web Application with Spring MVC
Problem
Solution
How It Works
Setting Up a Spring MVC Application
Creating the Configuration Files
Creating Spring MVC Controllers
Creating JSP Views
Deploying the Web Application
10-2.Mapping Requests to Handlers
Problem
Solution
How It Works
Mapping Requests by Bean Names
Mapping Requests by Controller Class Names
Mapping Requests with Custom Mapping Definitions
Mapping Requests by Multiple Strategies
10-3. Intercepting Requests with Handler Interceptors
Problem
Solution
How It Works
10-4. Resolving User Locales
Problem
Solution
How It Works
Resolving Locales by an HTTP Request Header
Resolving Locales by a Session Attribute
Resolving Locales by a Cookie
Changing a User’s Locale
10-5. Externalizing Locale-Sensitive Text Messages
Problem
Solution
How It Works
10-6. Resolving Views by Names
Problem
Solution
How It Works
Resolving Views Based on URLs
Resolving Views from an XML Configuration File
Resolving Views from a Resource Bundle
Resolving Views with Multiple Resolvers
The Redirect Prefix
10-7.Mapping Exceptions to Views
Problem
Solution
How It Works
10-8. Constructing ModelAndView Objects
Problem
Solution
How It Works
10-9. Creating a Controller with a Parameterized View
Problem
Solution
How It Works
10-10.Handling Forms with Form Controllers
Problem
Solution
How It Works
Creating a Form Controller
Applying the Post/Redirect/Get Design Pattern
Initializing the Command Object
Providing Form Reference Data
Binding Properties of Custom Types
Validating Form Data
10-11.Handling Multipage Forms with Wizard Form Controllers
Problem
Solution
How It Works
Creating Wizard Form Pages
Creating a Wizard Form Controller
Validating Wizard FormData
10-12.Grouping Multiple Actions into a Controller
Problem
Solution
How It Works
Creating a Multi-Action Controller
Mapping URLs to Handler Methods
10-13. Creating Excel and PDF Views
Problem
Solution
How It Works
Creating Excel Views
Creating PDF Views
10-14.Developing Controllers with Annotations
Problem
Solution
How It Works
Developing Single-Action and Multi-Action Controllers
Developing a Form Controller
Comparison with the Traditional Controller Approach
10-15. Summary
CHAPTER 11 Integrating Spring with Other Web Frameworks
11-1. Accessing Spring in Generic Web Applications
Problem
Solution
How It Works
11-2. Integrating Spring with Struts 1.x
Problem
Solution
How It Works
Loading Spring’s Application Context into a Struts Application
Accessing Spring’s Application Context in Struts Actions
Declaring Struts Actions in Spring’s Bean Configuration File
11-3. Integrating Spring with JSF
Problem
Solution
How It Works
Resolving Spring Beans in JSF
Declaring JSF Managed Beans in Spring’s Bean Configuration File
11-4. Integrating Spring with DWR
Problem
Solution
How It Works
Exposing Spring Beans for Remote Invocation
Configuring DWR in Spring’s Bean Configuration File
11-5. Summary
CHAPTER 12 Spring Testing Support
12-1. Creating Tests with JUnit and TestNG
Problem
Solution
How It Works
Testing with JUnit 3.8
Testing with JUnit 4
Testing with TestNG
12-2. Creating Unit Tests and Integration Tests
Problem
Solution
How It Works
Creating Unit Tests for Isolated Classes
Creating Unit Tests for Dependent Classes Using Stubs and Mock Objects
Creating Integration Tests
12-3.Unit Testing Spring MVC Controllers
Problem
Solution
How It Works
Unit Testing Classic Spring MVC Controllers
Unit Testing Annotation-Based Spring MVC Controllers
12-4.Managing Application Contexts in Integration Tests
Problem
Solution
How It Works
Accessing the Context with JUnit 3.8 Legacy Support
Accessing the Context with the TestContext Framework in JUnit 4.4
Accessing the Context with the TestContext Framework in JUnit 3.8
Accessing the Context with the TestContext Framework in TestNG
12-5. Injecting Test Fixtures into Integration Tests
Problem
Solution
How It Works
Injecting Test Fixtures with JUnit 3.8 Legacy Support
Injecting Test Fixtures with the TestContext Framework in JUnit 4.4
Injecting Test Fixtures with the TestContext Framework in JUnit 3.8
Injecting Test Fixtures with the TestContext Framework in TestNG
12-6.Managing Transactions in Integration Tests
Problem
Solution
How It Works
Managing Transactions with JUnit 3.8 Legacy Support
Managing Transactions with the TestContext Framework in JUnit 4.4
Managing Transactions with the TestContext Framework in JUnit 3.8
Managing Transactions with the TestContext Framework in TestNG
12-7. Accessing a Database in Integration Tests
Problem
Solution
How It Works
Accessing a Database with JUnit 3.8 Legacy Support
Accessing a Database with the TestContext Framework
12-8.Using Spring’s Common Testing Annotations
Problem
Solution
How It Works
Using Common Testing Annotations with JUnit 3.8 Legacy Support
Using Common Testing Annotations with the TestContext Framework
12-9. Summary
PART 3 Advanced
CHAPTER 13 Spring Security
13-1. Securing URL Access
Problem
Solution
How It Works
Setting Up a Spring MVC Application That Uses Spring Security
Creating the Configuration Files
Creating the Controllers and Page Views
Securing URL Access
13-2. Logging In to Web Applications
Problem
Solution
How It Works
HTTP Basic Authentication
Form-Based Login
The Logout Service
Anonymous Login
Remember-Me Support
13-3. Authenticating Users
Problem
Solution
How It Works
Authenticating Users with In-Memory Definitions
Authenticating Users Against a Database
Encrypting Passwords
Authenticating Users Against an LDAP Repository
Caching User Details
13-4.Making Access Control Decisions
Problem
Solution
How It Works
13-5. Securing Method Invocations
Problem
Solution
How It Works
Securing Methods by Embedding a Security Interceptor
Securing Methods with Pointcuts
Securing Methods with Annotations
13-6.Handling Security in Views
Problem
Solution
How It Works
Displaying Authentication Information
Rendering View Contents Conditionally
13-7.Handling Domain Object Security
Problem
Solution
How It Works
Setting Up an ACL Service
Maintaining ACLs for Domain Objects
Making Access Control Decisions Based on ACLs
Handling Domain Objects Returned from Methods
13-8. Summary
CHAPTER 14 Spring Portlet MVC Framework
14-1.Developing a Simple Portlet with Spring Portlet MVC
Problem
Solution
How It Works
Setting Up a Portlet Application
Creating the Configuration Files
Creating Portlet Controllers
Mapping Portlet Requests to Handlers
Resolving View Names into Views
Creating Portlet Views
Deploying the Portlet Application
14-2.Mapping Portlet Requests to Handlers
Problem
Solution
How It Works
Mapping Requests by the Portlet Mode
Mapping Requests by a Parameter
Mapping Requests by Both the Portlet Mode and Parameter
14-3.Handling Portlet Forms with Simple Form Controllers
Problem
Solution
How It Works
Creating Form Controllers
Validating Form Data
14-4.Developing Portlet Controllers with Annotations
Problem
Solution
How It Works
Developing Multi-Action Controllers
Developing Form Controllers
14-5. Summary
CHAPTER 15 Spring Web Flow
15-1.Managing a Simple UI Flow with Spring Web Flow
Problem
Solution
How It Works
Setting Up a Spring MVC Application That Uses Spring Web Flow
Creating the Configuration Files
Creating Web Flow Definitions
15-2.Modeling Web Flows with Different State Types
Problem
Solution
How It Works
Defining View States
Defining Action States
Defining Decision States
Defining End States
Defining Subflow States
15-3. Securing Web Flows
Problem
Solution
How It Works
15-4. Persisting Objects in Web Flows
Problem
Solution
How It Works
Configuring JPA in Spring’s Application Context
Setting Up JPA for Spring Web Flow
Using JPA in Web Flows
15-5. Integrating Spring Web Flow with JSF
Problem
Solution
How It Works
Rendering JSF Views for Spring Web Flow
Using the JSF Components of Spring Faces
15-6. Summary
CHAPTER 16 Spring Remoting and Web Services
16-1. Exposing and Invoking Services Through RMI
Problem
Solution
How It Works
Exposing an RMI Service
Invoking an RMI Service
16-2. Exposing and Invoking Services Through HTTP
Problem
Solution
How It Works
Exposing a Hessian Service
Invoking a Hessian Service
Exposing a Burlap Service
Invoking a Burlap Service
Exposing an HTTP Invoker Service
Invoking an HTTP Invoker Service
16-3. Choosing aWeb Service Development Approach
Problem
Solution
How It Works
Contract-LastWeb Services
Contract-FirstWeb Services
Comparison
16-4. Exposing and InvokingWeb Services Using XFire
Problem
Solution
How It Works
Exposing aWeb Service Using XFire
Inspecting the GeneratedWSDL File
Invoking aWeb Service Using XFire
Exposing an Annotation-BasedWeb Service Using XFire
16-5.Defining the Contract ofWeb Services
Problem
Solution
How It Works
Creating Sample XMLMessages
Generating an XSD File from Sample XMLMessages
Optimizing the Generated XSD File
Previewing the GeneratedWSDL File
16-6. ImplementingWeb Services Using Spring-WS
Problem
Solution
How It Works
Setting Up a Spring-WS Application
MappingWeb Service Requests to Endpoints
Creating Service Endpoints
Publishing theWSDL File
16-7. InvokingWeb Services Using Spring-WS
Problem
Solution
How It Works
16-8.DevelopingWeb Services with XMLMarshalling
Problem
Solution
How It Works
Creating Service Endpoints with XMLMarshalling
InvokingWeb Services with XMLMarshalling
16-9. Creating Service Endpoints with Annotations
Problem
Solution
How It Works
16-10. Summary
CHAPTER 17 Spring Support for EJB and JMS
17-1. Creating EJB 2.x Components with Spring
Problem
Solution
How It Works
Creating EJB 2.x Components with Spring’s Support
17-2. Accessing EJB 2.x Components in Spring
Problem
Solution
How It Works
Accessing EJB 2.x Components Without Spring’s Support
Accessing EJB 2.x Components with Spring’s Support
17-3. Accessing EJB 3.0 Components in Spring
Problem
Solution
How It Works
Accessing EJB 3.0 Components Without Spring’s Support
Accessing EJB 3.0 Components with Spring’s Support
17-4. Sending and Receiving JMSMessages with Spring
Problem
Solution
How It Works
Sending and ReceivingMessages with Spring’s JMS Template
Sending and ReceivingMessages to and from a Default Destination
Extending the JmsGatewaySupport Class
Converting JMSMessages
Managing JMS Transactions
17-5. CreatingMessage-Driven POJOs in Spring
Problem
Solution
How It Works
Listening for JMSMessages withMessage Listeners
Listening for JMSMessages with POJOs
Converting JMSMessages
Managing JMS Transactions
Using Spring’s JMS Schema
17-6. Summary
CHAPTER 18 Spring Support for JMX, E-mail, and Scheduling
18-1. Exporting Spring Beans As JMX MBeans
Problem
Solution
How It Works
Registering MBeansWithout Spring’s Support
Exporting Spring Beans As MBeans
Exposing MBeans for Remote Access
Assembling theManagement Interface of MBeans
Auto-Detecting MBeans by Annotations
18-2. Publishing and Listening to JMX Notifications
Problem
Solution
How It Works
Publishing JMX Notifications
Listening to JMX Notifications
18-3. Accessing Remote JMX MBeans in Spring
Problem
Solution
How It Works
Accessing Remote MBeans Through an MBean Server Connection
Accessing Remote MBeans Through an MBean Proxy
18-4. Sending E-mail with Spring’s E-mail Support
Problem
Solution
How It Works
Sending E-mail Using the JavaMail API
Sending E-mail with Spring’sMailSender
Defining an E-mail Template
Sending MIMEMessages
18-5. Scheduling with Spring’s JDK Timer Support
Problem
Solution
How It Works
Creating a Timer Task
Using JDK Timer Without Spring’s Support
Using JDK Timer with Spring’s Support
18-6. Scheduling with Spring’s Quartz Support
Problem
Solution
How It Works
Using Quartz Without Spring’s Support
Using Quartz with Spring’s Support
18-7. Summary
CHAPTER 19 Scripting in Spring
19-1. Implementing Beans with Scripting Languages
Problem
Solution
How It Works
Scripting Beans with JRuby
Scripting Beans with Groovy
Scripting Beans with BeanShell
19-2. Injecting Spring Beans into Scripts
Problem
Solution
How It Works
Injecting Spring Beans into JRuby
Injecting Spring Beans into Groovy
Injecting Spring Beans into BeanShell
19-3. Refreshing Beans from Scripts
Problem
Solution
How It Works
19-4.Defining Script Sources Inline
Problem
Solution
How It Works
19-5. Summary
Index
📜 SIMILAR VOLUMES
<p>Spring addresses most aspects of Java/Java EE application development and offers simple solutions to them. By using Spring, you will be lead to use industry best practices to design and implement your applications. The releases of Spring 2.x have added many improvements and new features to the 1.
<p><p><em>Spring Recipes: A Problem-Solution Approach, Third Edition</em> builds upon the best-selling success of the previous editions and focuses on the latest Spring Framework features for building enterprise Java applications. This book provides code recipes for the following, found in the lates
<p><p>Solve all your Spring 5 problems using complete and real-world code examples. When you start a new project, you’ll be able to copy the code and configuration files from this book, and then modify them for your needs. This can save you a great deal of work over creating a project from scratch.<