最近我开始为 Splitwise 创建克隆项目,问题是我无法从数据库中迭代我的用户,即使它们存在并且是在控制台中编写的。
https://github.com/DamianKwc/SplitwiseProject.git
Web 和模板都可以正确打开,但没有对象。这是我第一次来这里,如有任何问题,请见谅。
更换
<tr th:each="userList : ${theUsers}">
<td th:text="${user.id_user}"></td>
<td th:text="${user.user_name}"></td>
<td th:text="${user.username}"></td>
</tr>
与
<tr th:each="theUsers : ${userList}">
<td th:text="${theUsers.id_user}"></td>
<td th:text="${theUsers.user_name}"></td>
<td th:text="${theUsers.login}"></td>
</tr>