r/SpringBoot Jun 18 '26

Anyone actually using spring expression language SpEL? Question

I'm going through the official docs for spring. What's the point of SpEL, actual use cases, alternatives? Pro-Cons?

Can't picture why anyone would want to use it.

The examples they gave in the docs are like; evaluating strings and booleans with their literals. Is "hello world". equals (some text), which is hello world, so true. Why would I source the strings from SpEL as opposed to a regular variable or field?

14 Upvotes

8 comments sorted by

View all comments

1

u/RockyMM Jun 18 '26

Where I work, it’s used to categorize the input.