Abstract

Alternate way to integrate Groovy in a Java-Application using Spring, without the usage of <lang:groovy/>-Tags.

Advantages

Example

...
private GenericApplicationContext createAppContext(String path) {
	GenericApplicationContext ctx = new GenericApplicationContext();

        GroovyClassLoader defaultClassLoader = new GroovyClassLoader(this.getClass().getClassLoader());

        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(ctx);
	reader.setBeanClassLoader(defaultClassLoader);
	reader.loadBeanDefinitions(path);
	ctx.refresh();
	return ctx;
}
...
<bean id="tm" class="ticketing.bo.impl.TicketManagerImpl"/>
class TicketAssemblerImpl implements IBaseAssembler {
 ...
}

Hopefully that is helpful...