Spel
Hi, Spring fans! In this installment we look at the Spring Expression Language
Install / Use
/learn @spring-tips/SpelREADME
Spring Expression Language
History of Spring Expression Language
- JSP EL
- JSF EL
- JBoss EL
- OGNL
- Andy starts work on it. I'll never forget when he ripped out the Antlr code. Who does that?
A Tour of the Language
LiteralExpressionsTest- literal expressionsArraysAndCollectionsTest- create literal arrays, collections, and mapsMethodsTest- invoke custom methodsOperatorsTest- can't ask questions if you can't compare things...TypesTest- work with the.classliteral of a given type from SpELVariablesTest- learn how to set and reference variablesEvaluationContextsTesthow to limit what may be evaluated in productionRootObjectsTest- learn how to control the root object on which property accesses dereferenceSelectionsTest- learn how to filter collections or maps with selectionsNavigationsTest- the language makes it easy and safe to navigate property stacksSpringTest- see how the SpEL works with and within a Spring application.CompilationTest- did you know you can compile the Spring Expression Language statement?? Spring Integration knows this. And they use it well.SpelApplication- this example was inspired by this amazing commit from Marcus da Coregio who shows how to, given a SpEL expression - in this case extracted from annotations that Spring cares about - register the corresponding bean for reflection using the Spring AOT component model.
