Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • Works with Spring-AOP
  • You can use other Groovy-Classes e.g. internal datatypes, in your Beans without the need to inject them.

Example

Code Block
java
java
titleJava Code that's create the App-Contextjava
...
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;
}
...
Code Block
xml
xml
titleSample beans.xmlxml
<bean id="tm" class="ticketing.bo.impl.TicketManagerImpl"/>
Code Block
java
java
titleticketing/bo/impl/TicketAssemblerImpl.groovyjava
class TicketAssemblerImpl implements IBaseAssembler {
 ...
}

...