Thymeleaf - th:field="${}" 之间的区别和 th:field="*{}"; [英] Thymeleaf - The difference between th:field="${}" and th:field="*{}"
本文介绍了Thymeleaf - th:field="${}" 之间的区别和 th:field="*{}";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在教程中找不到这两个说明之间的区别.
I can't find on the tutorial the difference between this two instructions.
th:field="${something}" 和 th:field="*{something}"
谁能给我举个例子?
推荐答案
五种类型:
${...}
:变量表达式.这些是 OGNL 表达式(或 SpringEL 如果你有 spring 集成)
${...}
: Variable expressions. These are OGNL expressions (or Spring EL if you have spring integrated)
*{...}
:选择表达式.同上,除了它只会在之前选择的对象上执行
*{...}
: Selection expressions. Same as above, excepted it will be executed on a previously selected object only
#{...}
:消息 (i18n) 表达式.用于从外部来源检索特定于语言环境的消息
#{...}
: Message (i18n) expressions. Used to retrieve locale-specific messages from external sources
这篇关于Thymeleaf - th:field="${}" 之间的区别和 th:field="*{}";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文