【发布时间】:2019-09-27 02:13:56
【问题描述】:
我正在使用 Spring-Boot Thymeleaf 制作带有上传菜单(图像)的小应用程序,我的上传菜单正在工作,所以列表菜单上传,但问题是当我尝试将我的图像从 netbeans 中的静态文件夹显示到网页时我的文件名显示了,但我的图像没有。应该怎么样?
我从之前创建的列表菜单中获取文件数据图像。
//这是来自我的 list.html:
<table border='1' width='50%' height='100%'>
<tr th:each="files: ${fileName}">
<td th:text="${files}"/>
<td><img src="../static/img/ "width="100"
th:src="@{img/' + files + '}"/></td>
</tr>
我希望网页上的输出是我的文件名(来自图像)和图像显示。
【问题讨论】:
标签: java html spring spring-boot thymeleaf