如何在组合框中设置Thymeleaf值?

时间:2017-10-13 05:35:17

标签: spring-boot thymeleaf

我的问题是提取数据失败了。

车辆名称未显示在UI上,但数据已在控制台中显示。我该如何解决这个问题?

Vehicle Type:
<select name="example">
  <option value="NONE">...Choose...</option>
  <option th:each="type : ${datalist}" th:value="${type.getName()}"></option>
</select><br/>

1 个答案:

答案 0 :(得分:0)

添加th:text="${type.getName()}"您的选项属性