Document supported characters for identifiers in SpEL expressions
Closes gh-24359
This commit is contained in:
parent
6c2cb8ecf5
commit
152254ab0a
|
@ -1382,8 +1382,20 @@ example shows how to use the `new` operator to invoke constructors:
|
||||||
=== Variables
|
=== Variables
|
||||||
|
|
||||||
You can reference variables in the expression by using the `#variableName` syntax. 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
|
are set by using the `setVariable` method on `EvaluationContext` implementations.
|
||||||
following example shows how to use variables:
|
|
||||||
|
[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"]
|
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||||
.Java
|
.Java
|
||||||
|
|
Loading…
Reference in New Issue