Spel In Spring Boot
Spring 3 introduced the spring expression language spel which has a syntax similar to unified el.
Spel in spring boot. The spring expression language spel is an expression language that supports querying and manipulating an object graph at runtime. Spel provides some additional features such as method invocation and string templating functionality. The expression language supports the following functionality.
It can be used to configure spring applications or to write parsers to perform more general tasks in any application. There are many expression languages available such as jsp el ognl mvel and jboss el. Spring data jpa will pick up all beans of type evaluationcontextextension and use those to prepare the evaluationcontext to be used to evaluate the spel expression defined in query.
The folks at spring made the spring expression language part of what is considered spring core. As the name suggests it is a powerful expression language mainly used in spring framework for evaluating expressions such as mathematical relational logical operations conditional regular expressions etc at runtime. Spring expression language usually referred as spel is one of the modules available under spring s core module.
In this post we ll see examples of using spel with both xml and annotation based configuration. Spel is a powerful well supported expression language that can be used across all the products in the spring portfolio. It can save you a lot of coding because you can dynamically assign values at runtime.