下拉框:
设置默认值:th:selected="selected"
循环下拉框列表
<div class="layui-form-item">
<label class="layui-form-label">
<span class='x-red'>*</span>商品类型
</label>
<div class="layui-input-block">
<select th:name="goodsTypeName" th:id="goodsTypeName">
<option th:selected="selected" th:text="${good.goodstype.goodsTypeName}"
th:value="${good.goodstype.goodsTypeName}" th:title="原商品类型">
</option>
<option th:each="goodsTypeList:${allGoodsType}"
th:value="${goodsTypeList.getGoodsTypeName()}"
th:text="${goodsTypeList.getGoodsTypeName()}">
</option>
</select>
</div>
</div>
结果: