Spring Framework GroovyScriptFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework GroovyScriptFactory class.

This code example shows how to use the following methods:getScriptedObject, setBeanClassLoader, setBeanFactory
			customizerDecorator.setCustomizer(this.customizer);
		} 
		if (!CollectionUtils.isEmpty(variables)) {
			customizerDecorator.setVariables(variables);
		} 
		GroovyScriptFactory factory = new GroovyScriptFactory(this.getClass().getSimpleName(), customizerDecorator);
		if (this.beanClassLoader != null) {
			factory.setBeanClassLoader(this.beanClassLoader);
		} 
		if (this.beanFactory != null) {
			factory.setBeanFactory(this.beanFactory);
		} 
		Object result = factory.getScriptedObject(scriptSource);
		return (result instanceof GString) ? result.toString() : result;
	} 
 
	protected String generateScriptName(Message<?> message) {
		// Don't use the same script (class) name for all invocations by default 
		return getClass().getSimpleName() + message.getHeaders().getId().toString().replaceAll("-", "");
	} 
7
CodeRank
See Code Examples for Spring Framework GroovyScriptFactory Methods: