-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Document all predefined variables from ApplicationContext available in SpEL expressions #25037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same for javadoc of |
ExpressionParser parser = new SpelExpressionParser();
String name = parser.parseExpression("name?:'Unknown'").getValue(String.class);
System.out.println(name); // 'Unknown' It throws exception instead of print
|
Can you please open a separate issue for that? |
I've revised the entire section a bit, adding a note that generally all beans in the context are available as predefined variables in SpEL expressions, including standard context beans... singling out |
Currently the document only mentioned
systemProperties
as predefined variable, actually all builtin beans registered byAbstractApplicationContext
are predefined variables, such asenvironment
andsystemEnvironment
andmessageSource
andapplicationEventMulticaster
andlifecycleProcessor
. It's worthy to add a new section describe those predefined variables.The text was updated successfully, but these errors were encountered: