Spring SpEL - Overview


The Spring Expression Language, SpEL is a very powerful expression language and it supports querying and manipulating an object graph at runtime. It offers many advanced features like method invocation and basic string templating functionality.

Spring Expression Language was originally created for the Spring community to have a single well supported expression language to be used across all the products in the Spring portfolio. While SpEL serves as the foundation for expression evaluation within the Spring portfolio, it is not directly tied to Spring and can be used independently.

Following is the list of functionalities that Spring Expression Language, SpEL supports:

  • Literal expressions

  • Boolean and relational operators

  • Regular expressions

  • Class expressions

  • Accessing properties, arrays, lists, maps

  • Method invocation

  • Relational operators

  • Assignment

  • Calling constructors

  • Bean references

  • Array construction

  • Inline lists

  • Ternary operator

  • Variables

  • User defined functions

  • Collection projection

  • Collection selection

  • Templated expressions

We'll cover each and every topic in next chapters.