div th : if=' $ { # lists.isempty (list (您的集合名称) } )空/divdivth : if=' $ { not # lists.isempty ) list )您的
div th:each='lists, index : ${list} '姓名: input type=' text ' th : value=' $ { lists.name } ' readonly身份证号码: input type=' text ' th 3333 ' readonly年龄: input type=' text ' th : value=' $ { lists.age } ' readonlyyly ne1 ' butter spanth : if=' $ { lists.num } eq1 ' button=1/button/span/div list来自模型,lists是自定义名称,lists
ne和eq是thymeleaf的转义字符
遍历地图
div th:each='自定义名称1 : ${前端到地图} ' div th : each='自定义名称2 : ${自定义名称1.value } ' ' input th : text=