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| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_EXPRESSION_PREFIX
Default expression prefix: "#{"
|
static String |
DEFAULT_EXPRESSION_SUFFIX
Default expression suffix: "}"
|
| 构造器和说明 |
|---|
StandardBeanExpressionResolver()
Create a new
StandardBeanExpressionResolver with default settings. |
StandardBeanExpressionResolver(ClassLoader beanClassLoader)
Create a new
StandardBeanExpressionResolver with the given bean class loader,
using it as the basis for expression compilation. |
| 限定符和类型 | 方法和说明 |
|---|---|
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 StandardBeanExpressionResolver()
StandardBeanExpressionResolver with default settings.public StandardBeanExpressionResolver(@Nullable
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(String expressionPrefix)
public void setExpressionSuffix(String expressionSuffix)
public void setExpressionParser(org.springframework.expression.ExpressionParser expressionParser)
Default is a SpelExpressionParser,
compatible with standard Unified EL style expression syntax.
@Nullable public Object evaluate(@Nullable String value, org.springframework.beans.factory.config.BeanExpressionContext evalContext) throws org.springframework.beans.BeansException
evaluate 在接口中 org.springframework.beans.factory.config.BeanExpressionResolverorg.springframework.beans.BeansExceptionprotected void customizeEvaluationContext(org.springframework.expression.spel.support.StandardEvaluationContext evalContext)
The default implementation is empty.