【发布时间】:2020-08-09 21:40:49
【问题描述】:
<input type="hidden" id="customerid" th:value="${id}" th:field="*{customer.id}">
id 是模型属性。我想将它存储为 customer.id
【问题讨论】:
标签: database spring-boot thymeleaf
<input type="hidden" id="customerid" th:value="${id}" th:field="*{customer.id}">
id 是模型属性。我想将它存储为 customer.id
【问题讨论】:
标签: database spring-boot thymeleaf
如果使用 th:field,则不应指定 th:value 和 id :
<input type="hidden" th:field="*{customer.id}">
来源:https://www.thymeleaf.org/doc/tutorials/2.1/thymeleafspring.html#inputs
【讨论】: