what are the differences between the Spring Expression Language (SpEL) and the Unified Expression Language (UEL)?
The official Spring Documentation says:
"The language syntax is similar to Unified EL but offers additional features, most notably method invocation and basic string templating functionality." (see http://static.springsource.org/spring/docs/current/spring-framework-reference/html/expressions.html)
What exactly are the differences regarding method invocation?
Are there some more differences?
Thx, Matthias
Unified EL is a real template language, it offers no way to call methods. The language only allows you to access properties of Java beans and not their methods. EL 2.2 allows you to call methods, so this argument is no longer valid.
Spring El is a powerfull language as it allows you to call methods and constructors, make assignments and filter collections. If you use Spring EL in your JSP views, using the spring:eval tag, you also automatically get the benefit of the spring converters/formatters. It is a great tool, but is should be used with care because it makes it very tempting to put all kinds of application logic in your views.
Besides the JSP views Spring EL can be used in other parts of the Spring framework like in security expressions with the @PreAuthorize annotation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With