SpEL Basics: Expressions, Literals, Properties, Methods, Operators
Learn SpEL Basics: Expressions, Literals, Properties, Methods, Operators (Phase 8 · Spring Expression Language (SpEL) (Core), Spring Core) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
What is SpEL? • SpEL is a powerful expression language that can query and manipulate an object graph at runtime , used in @Value("#{...}") , XML, @ConditionalOnExpression , @Cacheable(condition=...) , @PreAuthorize , Spring Data @Query , Spring Integration. The API: ExpressionParser ( SpelExpressionParser ), Expression , EvaluationContext ( StandardEvaluationContext or the safer SimpleEvaluationContext ). Expressions are written #{...} in annotations (placeholders use ${...} ).