28. Dynamic language support

28.1 Introduction

Spring 2.0 introduces comprehensive support for using classes and objects that have been defined using a dynamic language (such as JRuby) with Spring. This support allows you to write any number of classes in a supported dynamic language, and have the Spring container transparently instantiate, configure and dependency inject the resulting objects.

The dynamic languages currently supported are:

  • JRuby 0.9 / 1.0

  • Groovy 1.0 / 1.5

  • BeanShell 2.0

Fully working examples of where this dynamic language support can be immediately useful are described in the section entitled Section 28.4, “Scenarios”.

Note: Only the specific versions as listed above are supported in Spring 2.5. In particular, JRuby 1.1 (which introduced many incompatible API changes) is not supported at this point of time.