我尝试用一些文件做一个下拉列表,我发现这个例子,我不知道它应该包含th:field。如果我有什么选择值,请你告诉我它应该包含春季的post方法吗?请帮我!! :)
<select th:field="*{type}">
<option th:each="type : ${allTypes}"
th:value="${type}"
th:text="#{${'seedstarter.type.' + type}}">Wireframe</option>
</select>
正如在Tutorial: Thymeleaf + Spring中所提到的(转到7.2输入),它说它是一个与你的表单和bean绑定的模型。