Document supported characters for identifiers in SpEL expressions

Closes gh-24359
This commit is contained in:
Sam Brannen 2020-01-15 13:53:22 +01:00
parent 6c2cb8ecf5
commit 152254ab0a
1 changed files with 14 additions and 2 deletions

View File

@ -1382,8 +1382,20 @@ example shows how to use the `new` operator to invoke constructors:
=== Variables
You can reference variables in the expression by using the `#variableName` syntax. Variables
are set by using the `setVariable` method on `EvaluationContext` implementations. The
following example shows how to use variables:
are set by using the `setVariable` method on `EvaluationContext` implementations.
[NOTE]
====
Valid variable names must be composed of one or more of the following supported
characters.
* letters: `A` to `Z` and `a` to `z`
* digits: `0` to `9`
* underscore: `_`
* dollar sign: `$`
====
The following example shows how to use variables.
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
.Java