Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Expression Language dollar vs hash ($ vs #)

I'm a little confused concerning when to use $ compared to #. Spring documentation only uses #.

I need to know when to use $ and when #?
Can I use # in the MVC JSP pages?

like image 501
S. Najim Avatar asked Oct 31 '25 08:10

S. Najim


1 Answers

According to this answer:

${...} is the property placeholder syntax. It can only be used to dereference properties.

#{...} is SpEL syntax, which is far more capable and complex. It can also handle property placeholders, and a lot more besides.

Both are valid, and neither is deprecated.

like image 95
Ilias Mentz Avatar answered Nov 03 '25 01:11

Ilias Mentz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!