public class StandardBeanExpressionResolver extends 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 String |
DEFAULT_EXPRESSION_PREFIX
Default expression prefix: "#{"
|
static String |
DEFAULT_EXPRESSION_SUFFIX
Default expression suffix: "}"
|
Constructor and Description |
---|
StandardBeanExpressionResolver() |
Modifier and Type | Method and Description |
---|---|
protected void |
customizeEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evalContext)
Template method for customizing the expression evaluation context.
|
Object |
evaluate(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(String expressionPrefix)
Set the prefix that an expression string starts with.
|
void |
setExpressionSuffix(String expressionSuffix)
Set the suffix that an expression string ends with.
|
public static final String DEFAULT_EXPRESSION_PREFIX
public static final String DEFAULT_EXPRESSION_SUFFIX
public void setExpressionPrefix(String expressionPrefix)
DEFAULT_EXPRESSION_PREFIX
public void setExpressionSuffix(String expressionSuffix)
DEFAULT_EXPRESSION_SUFFIX
public void setExpressionParser(org.springframework.expression.ExpressionParser expressionParser)
Default is a SpelExpressionParser
,
compatible with standard Unified EL style expression syntax.
public Object evaluate(String value, org.springframework.beans.factory.config.BeanExpressionContext evalContext) throws org.springframework.beans.BeansException
evaluate
in interface org.springframework.beans.factory.config.BeanExpressionResolver
org.springframework.beans.BeansException
protected void customizeEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evalContext)
The default implementation is empty.