Browse Source

Document supported characters for identifiers in SpEL expressions

Closes gh-24359
pull/24367/head
Sam Brannen 5 years ago
parent
commit
152254ab0a
  1. 16
      src/docs/asciidoc/core/core-expressions.adoc

16
src/docs/asciidoc/core/core-expressions.adoc

@ -1382,8 +1382,20 @@ example shows how to use the `new` operator to invoke constructors: @@ -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

Loading…
Cancel
Save