Chapter 14. Dynamic Languages

Spring 2.0 brought support for dynamic languages and Spring 2.5 continues the support. By "dynamic language," we mean code that is not compiled and has an interpreter written in Java. In other words, a dynamic language can be anything you wish as long as there is a Java library that can execute it. Spring comes with support for JRuby, Groovy, and BeanShell.

Dynamic language support means that you can now have Spring-managed beans that are not written in Java! Imagine having an external script that handles validation, for example. The traditional approach would be to implement the Validator interface in Java and then set the validator implementation bean as a dependency of a form controller. If the validation rules ...

Get Pro Spring 2.5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.