The Spring Expression Language (SpEL) is a simple and powerful expression language
which helps to query and manipulate objects at runtime.
The following example shows defining variables using SpEL.
StandardEvaluationContext stdContext = new StandardEvaluationContext();
//Define a variable named 'org' with value 'BTC'
stdContext.setVariable("org", "BTC");
stdContext.setVariable("emp", new Employee(1, "ABC", 9999));
ExpressionParser parser = new SpelExpressionParser();
String value = parser.parseExpression("#org").getValue(stdContext, String.class);
System.out.println(value);
value = parser.parseExpression("#emp.salary").getValue(stdContext, String.class);
System.out.println(value);