在 select 中使用 list

你可以使用列表变量来形成 <select> 元素

 <select th:field="*{countries}">
     <option th:each="country: ${countries}"
             th:value="${country.id}"
             th:text="#{${'selected.label.' + country.name}}"/>
</select>