List of usage examples for org.springframework.expression.spel.support StandardEvaluationContext addMethodResolver
public void addMethodResolver(MethodResolver resolver)
From source file:com.creactiviti.piper.core.task.SpelTaskEvaluator.java
private StandardEvaluationContext createEvaluationContext(Context aContext) { StandardEvaluationContext context = new StandardEvaluationContext(aContext); context.addPropertyAccessor(new MapPropertyAccessor()); context.addMethodResolver(methodResolver()); return context; }
From source file:com.googlecode.ehcache.annotations.key.SpELCacheKeyGenerator.java
/** * Get the {@link EvaluationContext} to use to evaluate the configured {@link Expression} *///from w w w . j av a 2 s . c o m protected EvaluationContext getEvaluationContext(MethodInvocation methodInvocation, Object... args) { final StandardEvaluationContext evaluationContext = new StandardEvaluationContext(); evaluationContext.setBeanResolver(new BeanFactoryResolver(this.beanFactory)); evaluationContext.setVariable("invocation", methodInvocation); evaluationContext.setVariable("args", args); evaluationContext.setVariable("key", keyCallbackObject); evaluationContext.addMethodResolver(this.methodResolver); return evaluationContext; }