我正在从我的控制器向模板属性对象(产品)发送:视图页面中的每个标签.
如果该对象包含3个值,如0,1,3,我可以通过使用 th:each="var:${product}" 然后 th:text=${var.id},但在这里我只想1.我怎么能得到它?
th:each="var:${product}"
th:text=${var.id}
任何人都可以帮我解决这个问题吗?
spring thymeleaf
spring ×1
thymeleaf ×1