Spring Expression Language dollar vs hash ($ vs #)

纵饮孤独 提交于 2020-07-09 04:59:48

问题


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

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


回答1:


According to this :

${...} 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.



来源:https://stackoverflow.com/questions/50695488/spring-expression-language-dollar-vs-hash-vs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!