Let’s say your on a project that has never upgraded its version of
spring
;P) hopefully cause you’ve found Jruby so great you wouldn’t bother with
it
again. However now you have to modify a piece of the codebase in spring
and
to avoid the nastiness you decide to do it in spring, but Spring 2 only
supports Jruby 0.99 so your out of luck ;/ It turns out its really
simple to
backport support.
Step 1. Download a copy of spring 3 Download Spring
3http://www.springsource.com/download/community
Step 2. Extract org.springframework.core-sources-3.0.1.RELEASE-A.jar
Step 4. Copy org.SpringFramework.core.util.ReflectionUtils.java to your
local project *in proper namespace of course
Step 5. Extract org.springframework.context-sources-3.0.1.RELEASE-A.jar
Step 6. Copy org.SpringFramework.jruby.JRubyScriptFactory.java and
JRubyScriptUtils.java to your project *in proper namespace of course
Step 7. Compile and bam now your spring beans support jruby 1.4 (i.e
spring
beans Jruby in
Springhttp://static.springsource.org/spring/docs/2.0.x/reference/dynamic-language.html)
Step 8. Profit!
Matthew K.
http://blog.hyperworks.nu/2010/2/backporting-jruby-14-to-spring-2