Document that functions are variables in SpEL EvaluationContexts #32258
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: documentation
A documentation task
Milestone
Although
EvaluationContext
defines the API for setting and looking up variables, the internals of the Spring Expression Language (SpEL) actually provide explicit support for registering functions as variables.This is evident in the two
registerFunction()
variants inStandardEvaluationContext
; however, functions can also be registered as variables when using theSimpleEvaluationContext
.Since custom functions are also viable in use cases involving the
SimpleEvaluationContext
, we should document that functions may be registered in aSimpleEvaluationContext
viasetVariable()
.We should also explicitly document the "function as a variable" behavior in the class-level Javadoc for both
StandardEvaluationContext
andSimpleEvaluationContext
.The text was updated successfully, but these errors were encountered: