public class StandardBeanExpressionResolver
extends java.lang.Object
implements org.springframework.beans.factory.config.BeanExpressionResolver
BeanExpressionResolver
interface, parsing and evaluating Spring EL using Spring's expression module.ExpressionParser,
SpelExpressionParser,
StandardEvaluationContext| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_EXPRESSION_PREFIX
Default expression prefix: "#{"
|
static java.lang.String |
DEFAULT_EXPRESSION_SUFFIX
Default expression suffix: "}"
|
| Constructor and Description |
|---|
StandardBeanExpressionResolver()
Create a new
StandardBeanExpressionResolver with default settings. |
StandardBeanExpressionResolver(java.lang.ClassLoader beanClassLoader)
Create a new
StandardBeanExpressionResolver with the given bean class loader,
using it as the basis for expression compilation. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
customizeEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evalContext)
Template method for customizing the expression evaluation context.
|
java.lang.Object |
evaluate(java.lang.String value,
org.springframework.beans.factory.config.BeanExpressionContext evalContext) |
void |
setExpressionParser(org.springframework.expression.ExpressionParser expressionParser)
Specify the EL parser to use for expression parsing.
|
void |
setExpressionPrefix(java.lang.String expressionPrefix)
Set the prefix that an expression string starts with.
|
void |
setExpressionSuffix(java.lang.String expressionSuffix)
Set the suffix that an expression string ends with.
|
public static final java.lang.String DEFAULT_EXPRESSION_PREFIX
public static final java.lang.String DEFAULT_EXPRESSION_SUFFIX
public StandardBeanExpressionResolver()
StandardBeanExpressionResolver with default settings.public StandardBeanExpressionResolver(java.lang.ClassLoader beanClassLoader)
StandardBeanExpressionResolver with the given bean class loader,
using it as the basis for expression compilation.beanClassLoader - the factory's bean class loaderpublic void setExpressionPrefix(java.lang.String expressionPrefix)
DEFAULT_EXPRESSION_PREFIXpublic void setExpressionSuffix(java.lang.String expressionSuffix)
DEFAULT_EXPRESSION_SUFFIXpublic void setExpressionParser(org.springframework.expression.ExpressionParser expressionParser)
Default is a SpelExpressionParser,
compatible with standard Unified EL style expression syntax.
public java.lang.Object evaluate(java.lang.String value,
org.springframework.beans.factory.config.BeanExpressionContext evalContext)
throws org.springframework.beans.BeansException
evaluate in interface org.springframework.beans.factory.config.BeanExpressionResolverorg.springframework.beans.BeansExceptionprotected void customizeEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evalContext)
The default implementation is empty.