【发布时间】:2022-07-23 00:38:20
【问题描述】:
我是学生,我尝试将图像放到测试站点。 但有些不对劲。我不知道是什么。 我为我的“资源”目录尝试了很多 URL 或更改位置
但它不起作用。 mb 有人能找出错误吗?
代码:
<!DOCTYPE html>
<html lang="en" xmlns:th="http://thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Все люди</title>
</head>
<body>
<div th:each="person : ${people}">
<a th:href="@{/people/{id}(id=${person.getId()})}"
th:text="${person.getName() + ', ' + person.getAge() + ', ' + person.getEmail()}">user</a>
</div>
<br>
<hr>
<a href="/people/new">New person</a>
<a href="/people/createtestdb">Add more rows</a>
<br>
<div>
<img src="/1650622351952.jpg"/>
</div>
</body>
</html>
My project structure nowdPP.png
【问题讨论】:
-
如果它与 html 位于同一目录中(并且不应该),您是否尝试过
<img src="1650622351952.jpg"/>