【发布时间】:2018-05-06 02:19:27
【问题描述】:
您好,我想将所有列表元素与特定 ID 关联起来。我应该在我的代码中更改什么?上下文已正确添加,但我可以从此模板生成站点
我的代码如下所示:
<tr th:each="mentor : ${mentorsList}">
<a th:href="@{'/edit-mentor/' + ${mentor.id}}"/>
<td th:text="${mentorStat.count}">1</td>
<td th:text="${mentor.name}">Adam</td>
<td th:text="${mentor.surname}">Nowak</td>
<td th:text="${mentor.email}">example@gmail.com</td>
</a>
</tr>
重定向后我想获得 /edit-mentor/32 之类的链接
【问题讨论】: