86
Spring Expression Language (SPEL) Tutorial
SpEL is an exression language supporting the features of querying and manipulating an object graph at runtime.
There are many expression languages available such as JSP EL, OGNL, MVEL and JBoss EL. SpEL provides some additional features such as method invocation and string templating functionality.
SpEL API
The SpEL API provides many interfaces and classes. They are as follows:
- Expression interface
- SpelExpression class
- ExpressionParser interface
- SpelExpressionParser class
- EvaluationContext interface
- StandardEvaluationContext class
Hello SPEL Example
Other SPEL Example
Let’s see a lot of useful examples of SPEL. Here, we are assuming all the examples have been written inside the main() method.
Using concat() method with String
Converting String into byte array
Getting length after converting string into bytes
Converting String contents into uppercase letter
Next TopicOperators In Spel