Introduction of Spring Expression Language (SpEL) by R4R Team

Introduction:-
The Spring Expression Language is a powerful expression language that supports querying and manipulating an object graph at runtime. SpEL expressions can be used with XML or annotation based configuration metadata for defining BeanDefinitions. In both cases the syntax to define the expression is of the form:
#{ <expression string>}


There are several existing expression languages like MVEL, OGNL and JBoss EL. Every EL is developed with some purpose in mind. SpEL is created to help the Spring porfolio products. The syntax used for the SpEL is same like Unified EL.

SpEL serves as the foundation for expression evaluation within the Spring portfolio, it is not directly tied to Spring and can be used independently. In order to be self contained, many of the examples in this chapter use SpEL as if it were an independent expression language. This requires creating a few bootstrapping infrastructure classes such as the parser.
 

Another advantage of SpEL is it can work independently without depending on the Spring environment. In the following sections, you will read the complete details on SpEL API and Features the Spring Expression Language.
 

SpEL API:-

The SpEL API provides many interfaces and classes. They are as follows:
1 Expression interface
2 SpelExpression class
3 ExpressionParser interface
4 SpelExpressionParser class
5 EvaluationContext interface
6 StandardEvaluationContext class

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!