Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Thymeleaf-th:field="${};和th:field="*{};_Thymeleaf - Fatal编程技术网

Thymeleaf-th:field="${};和th:field="*{};

Thymeleaf-th:field="${};和th:field="*{};,thymeleaf,Thymeleaf,我在教程中找不到这两个说明之间的区别 th:field=“${something}”和th:field=“*{something}” 谁能给我举个例子吗? 五种类型: ${…}:变量表达式。这些是OGNL表达式(或Spring) EL(如果您有spring集成) *{…}:选择表达式。与上面相同,但它将仅在先前选择的对象上执行 {…}:消息(i18n)表达式。用于从外部源检索特定于区域设置的消息 @{…}:链接(URL)表达式。使用 构建URL的步骤 ~{…}:片段表达式。代表 标记并在模板周

我在教程中找不到这两个说明之间的区别

th:field=“${something}”th:field=“*{something}”

谁能给我举个例子吗?

五种类型:

  • ${…}
    :变量表达式。这些是OGNL表达式(或Spring) EL(如果您有spring集成)

  • *{…}
    :选择表达式。与上面相同,但它将仅在先前选择的对象上执行

  • {…}
    :消息(i18n)表达式。用于从外部源检索特定于区域设置的消息

  • @{…}
    :链接(URL)表达式。使用 构建URL的步骤
  • ~{…}
    :片段表达式。代表 标记并在模板周围移动它们