When using the ${}
syntax, you are in fact using Spring Expression Language (SpEL). There are several variants of EL available in the wild; SpEl is one of the most powerful variants.
Here is an overview of its main features:
Feature |
Syntax |
Explanation |
---|---|---|
Accessing a list element |
| |
Accessing a map entry |
| |
Ternary operator |
| |
Elvis operator |
|
Returns |
Safe navigation |
|
Returns |
Templating |
|
Injects values into a string |
Projections |
|
Extracts the names of all the persons and puts them into a list |
Selection |
|
Retrieves the person whose name is Bob inside a list |
Function call |
|
Note
For complete reference, check the manual at http://docs.spring.io/spring/docs/current/spring-framework-reference/html/expressions.html...