Section 3.1: Syntax Reference

In Spring, you can use @Value("#{expression}") to inject values at runtime, where the expression is a Spring Expression Language (SpEL) expression. Here's a syntax reference for various use cases:

Literal Expressions

Supported types include strings, dates, numeric values (int, real, and hex), boolean, and null.

Inline List

Inline Maps

Invoking Methods

These examples demonstrate the flexibility of SpEL, allowing for the dynamic evaluation of expressions for value injection.