Comment faire pour afficher la collection d'objets avec pour chaque boucle dans Thymeleaf?

Je veux afficher les données de la base de données dans le navigateur avec Spring MVC. Tout est bien, sauf mon Thymeleaf modèle pour chaque boucle. Quelque chose est mal il.

Comment puis-je afficher id données dans ID ligne et name données dans Nom ligne parcourant la collection d'objets avec pour chaque boucle?

Code Source:

<!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>
    <table border="1">
        <tr style="font-size: 13">
            <td>ID</td>
            <td>Name</td>
        </tr>
        <tr th:each="count :  ${id}">
            <td><p th:text="${count}" /></td>       
            <td><p th:text="${name}" /></td>        

        </tr>
    </table>
</body>
</html>
InformationsquelleAutor Just4Fun | 2017-04-06