We were not successful trying to integrate Spring jars to leverage some legacy application capability a couple years ago in the OSGi container. I am not sure it can be done, we had a lot of time invested in it when we gave up.
I'd be interested in hearing about how, if someone got it working.
CQ (more specifically Sling) can support any scripting/templating language which complies with JSR-223. In some cases, a usable OSGi bundle is provided (e.g. Groovy) and in others the implementation needs to be repackaged (e.g. JRuby).