img
Using Groovy with Spring: The Spring Framework provides comprehensive
·
support for scripting languages. As of version 3.1, out-of-the-box support for
Groovy, JRuby, and BeanShell is provided. In this chapter, we will discuss how to
use Groovy with Spring to implement a simple rule engine based on the DSL
supported by Groovy.
This chapter is not intended to serve as a detailed reference on using scripting languages. Each
language in books of their own that discuss their design and usage in detail. The main objective of this
chapter is to give you an idea how the Spring Framework supports scripting languages, with a sound
example on what the benefit are of using a scripting language in addition to Java in a Spring-based
application.
Project for Chapter Samples
We will use a simple Spring utility project as our starting point for the samples that will be developed in
this chapter. For using Groovy, an additional procedure is required to install the Groovy plug-in for
Eclipse; the steps are detailed in the following sections.
Create a Simple Spring Utility Project
The first step is to create a simple Spring utility project. In STS, choose File New Spring Template
Project, and then choose Simple Spring Utility Project, as shown in Figure 22-1.
Figure 22-1. Creating a simple Spring utility project in STS
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home