Saturday, August 15, 2020

Spring Expression Language

 The Spring Expression language is a powerfull expression language for Spring Applications.

It Supports querying and manipulating object graph at runtime.


e.g.

ExpressionParser parser = new SpelExpressionParser();
Expression exp = parser.parseExpression("new String('hello world').toUpperCase()");
String message = exp.getValue(String.class);


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> }.

No comments:

Post a Comment

Spring - AutoWiring

Spring automatically resolves the dependencies between the collaborating beans by inspecting the contents of the BeanFactory. This is called...