spring spel tutorial

Spring SpEL:

The SpEL stands for Spring Expression Language. It is a powerful expression language which supports querying and manipulating an object graph at the bean creation time or run time. It is similar to other expression languages like JSP EL, OGNL, MVEL and JBoss EL etc with some additional features like method invocation and basic string templating functionality.

Note: Spring expressions are available with both XML and annotation type bean configuration metadata. For using annotation type bean configuration metadata we use @Component and @Value.

Syntax:

#{ expression }

Some uses of Spring SpEL:

1. It can be used to inject a bean or a bean property in another bean.
2. It can be used to invoke a bean method in another bean.
3. It can be used to execute any standard mathematical, logical or relational operations.
4. It can be used to perform conditional checking with ternary operator.
5. It can be used to get the elements of a Map or a List.

Spring SpEL interfaces and classes:

1. Expression interface
2. SpelExpression class
3. ExpressionParser interface
4. SpelExpressionParser class
5. EvaluationContext interface
6. StandardEvaluationContext class

Spring SpEL tutorial:

Spring spel hello world example.
Spring el hello world example. Spring el hello world tutorial. Let us discuss spring spel hello world example program code in eclipse. Download source code.
Spring spel operators example.
Spring spel operators example. Spring expression language operators. Let us discuss spring el operator with examples in eclipse. Download source code.
Spring spel ternary operator example.
Spring spel ternary operator example. Spring expression language ternary operator. Spring el ternary operator. Spring el if then else. Download source code.
Spring spel standardevaluationcontext (variable) example.
Spring el standardevaluationcontext example. Spring spel standardevaluationcontext. Spring spel variables example. Spring expression language variables.
Spring spel bean reference example.
Spring el bean reference. Spring spel bean reference example. Spring expression language bean reference example. Download source code in eclipse.
Spring spel method invocation example.
Spring el method invocation. Spring spel method invocation example. Spring expression language method invocation. Download source code in eclipse.
Spring spel list, map example.
Spring el map example. Spring spel list example. Spring expression language list. Spring expression language map. Download source code in eclipse.
Spring spel regex example.
Spring spel regex example. Spring expression language regex. Spring el regular expression. Spring spel regular expression. Download source code in eclipse.