我是ThymeLeaf新手,想知道是否有一种方法可以循环遍历 <p>
HTML标签,并在该标签内迭代一个数组。 我希望smokeTest
中的元素最终出现在不同的段落中。
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Getting Started: Serving Web Content</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<p th:text="${smokeTests[0].name}"/>
</body>
</html>
感谢您的帮助