4

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?

informatik01
  • 16,038
  • 10
  • 74
  • 104
S. Najim
  • 233
  • 2
  • 13
  • Duplicate: [Spring Expression Language (SpEL) with @Value: dollar vs. hash ($ vs. #)](https://stackoverflow.com/questions/5322632/spring-expression-language-spel-with-value-dollar-vs-hash-vs) – informatik01 Jun 26 '23 at 19:27

1 Answers1

4

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.

informatik01
  • 16,038
  • 10
  • 74
  • 104
Ilias Mentz
  • 500
  • 1
  • 7
  • 16