Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 无法使用spring显示图像_Spring Boot - Fatal编程技术网

Spring boot 无法使用spring显示图像

Spring boot 无法使用spring显示图像,spring-boot,Spring Boot,截图: 我在spring中遵循了代码,但没有成功,我做错了什么吗 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <head> <title>Taco Cloud</title> </head> <body> <h1>W

截图:

我在spring中遵循了代码,但没有成功,我做错了什么吗

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:th="http://www.thymeleaf.org">
  <head>
    <title>Taco Cloud</title>
  </head>
  <body>
    <h1>Welcome to...</h1>
    <img th:src="@{/images/taco.jpg}"/>
  </body>
</html>

玉米卷云
欢迎来到。。。

您很可能输入了错误的图像路径。 尝试使用
/resources/static/images/taco.jpg

如果这不起作用,就用路径做实验。

在问题中加一个。为什么你认为我们会想要一张照片?谢谢你的回复,我发布了html代码。