【Thymeleaf】遍历List

Controlller中:

List<String> vnames=。。。。。。

...

session.setAttribute("vnames",vnames);

页面上:

<ul th:each="v:${session.vnames}">

      <li th:text="${v}"></li>

</ul>

END

生活越是不如意,越该钻研技术,用自己所长打开一片天。

原文地址:https://www.cnblogs.com/heyang78/p/15673942.html