From 152254ab0a7b61e742f35cb67acadcfc8b867b46 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 15 Jan 2020 13:53:22 +0100 Subject: [PATCH] Document supported characters for identifiers in SpEL expressions Closes gh-24359 --- src/docs/asciidoc/core/core-expressions.adoc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/docs/asciidoc/core/core-expressions.adoc b/src/docs/asciidoc/core/core-expressions.adoc index 0c2e823fc8b..5a833d20764 100644 --- a/src/docs/asciidoc/core/core-expressions.adoc +++ b/src/docs/asciidoc/core/core-expressions.adoc @@ -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