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 self-evident in the two registerFunction() variants in StandardEvaluationContext; however, functions can also be registered as variables when using the SimpleEvaluationContext. Since custom functions are also viable in use cases involving the SimpleEvaluationContext, this commit documents that functions may be registered in a SimpleEvaluationContext via setVariable(). This commit also explicitly documents the "function as a variable" behavior in the class-level Javadoc for both StandardEvaluationContext and SimpleEvaluationContext, as well as in the reference manual. Closes gh-32258 |
||
---|---|---|
.. | ||
ROOT |