我想在页面 html 中显示图片,并与数据库中图片的来源和名称相连接 示例:
<tr th:each="e:${PageEtudiants.content}">
<td> <img class="img img-circle" width="50" height="50" `th:src="@{/Upload/(${e.photo})}"/></td>
</tr>`
谢谢
最佳答案
请尝试使用以下代码
<img class="img img-circle" width="50" height="50" th:src="@{'/Upload/'+${e.photo()}}"/>
关于Java spring thymeleaf 显示图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59364168/