org.springframework.beans.factory.config.BeanExpressionResolver
interface, parsing and evaluating Spring EL using Spring's expression module.
All beans in the containing BeanFactory are made available as
predefined variables with their common bean name, including standard context
beans such as "environment", "systemProperties" and "systemEnvironment".
BeanExpressionContext#getBeanFactory(), org.springframework.expression.ExpressionParser , org.springframework.expression.spel.standard.SpelExpressionParser , org.springframework.expression.spel.support.StandardEvaluationContext
| Modifier and Type | Field and Description |
|---|---|
| private final ParserContext | |
| public static final String | DEFAULT_EXPRESSION_PREFIX
Default expression prefix: "#{". |
| public static final String | DEFAULT_EXPRESSION_SUFFIX
Default expression suffix: "}". |
| private final Map | |
| private final Map | |
| private ExpressionParser | |
| private String | |
| private String | |
| public static final String | MAX_SPEL_EXPRESSION_LENGTH_PROPERTY_NAME
System property to configure the maximum length for SpEL expressions: spring.context.expression.maxLength. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StandardBeanExpressionResolver(ClassLoader
the factory's bean class loader beanClassLoader)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| protected void | customizeEvaluationContext(StandardEvaluationContext evalContext)
Template method for customizing the expression evaluation context. |
| public Object | evaluate(String
the value to evaluate as an expression value, BeanExpressionContext the bean expression context to use when
evaluating the expression beanExpressionContext)Implements org. |
| private static int | |
| public void | setExpressionParser(ExpressionParser expressionParser)
Specify the EL parser to use for expression parsing. |
| public void | |
| public void |
| beanExpressionParserContext | back to summary |
|---|---|
| private final ParserContext beanExpressionParserContext | |
| DEFAULT_EXPRESSION_PREFIX | back to summary |
|---|---|
| public static final String DEFAULT_EXPRESSION_PREFIX Default expression prefix: "#{". | |
| DEFAULT_EXPRESSION_SUFFIX | back to summary |
|---|---|
| public static final String DEFAULT_EXPRESSION_SUFFIX Default expression suffix: "}". | |
| evaluationCache | back to summary |
|---|---|
| private final Map<BeanExpressionContext, StandardEvaluationContext> evaluationCache | |
| expressionCache | back to summary |
|---|---|
| private final Map<String, Expression> expressionCache | |
| expressionParser | back to summary |
|---|---|
| private ExpressionParser expressionParser | |
| expressionPrefix | back to summary |
|---|---|
| private String expressionPrefix | |
| expressionSuffix | back to summary |
|---|---|
| private String expressionSuffix | |
| MAX_SPEL_EXPRESSION_LENGTH_PROPERTY_NAME | back to summary |
|---|---|
| public static final String MAX_SPEL_EXPRESSION_LENGTH_PROPERTY_NAME System property to configure the maximum length for SpEL expressions: spring.context.expression.maxLength. Can also be configured via the
| |
| StandardBeanExpressionResolver | back to summary |
|---|---|
| public StandardBeanExpressionResolver() Create a new As of Spring Framework 6.1.3, the maximum SpEL expression length can be
configured via the | |
| StandardBeanExpressionResolver | back to summary |
|---|---|
| public StandardBeanExpressionResolver(ClassLoader beanClassLoader) Create a new As of Spring Framework 6.1.3, the maximum SpEL expression length can be
configured via the
| |
| customizeEvaluationContext | back to summary |
|---|---|
| protected void customizeEvaluationContext(StandardEvaluationContext evalContext) Template method for customizing the expression evaluation context. The default implementation is empty. | |
| evaluate | back to summary |
|---|---|
| public Object evaluate(String value, BeanExpressionContext beanExpressionContext) throws BeansException Implements org. Doc from org. Evaluate the given value as an expression, if applicable; return the value as-is otherwise.
| |
| retrieveMaxExpressionLength | back to summary |
|---|---|
| private static int retrieveMaxExpressionLength() | |
| setExpressionParser | back to summary |
|---|---|
| public void setExpressionParser(ExpressionParser expressionParser) Specify the EL parser to use for expression parsing. Default is a | |
| setExpressionPrefix | back to summary |
|---|---|
| public void setExpressionPrefix(String expressionPrefix) Set the prefix that an expression string starts with. The default is "#{".
| |
| setExpressionSuffix | back to summary |
|---|---|
| public void setExpressionSuffix(String expressionSuffix) Set the suffix that an expression string ends with. The default is "}".
| |