我希望我的图像通过这样的胸腺生长因子表达式在receipt_failure.html中显示出来:
<img th:src="@{/src/main/resources/images/icons-alert-circle.png}" />图像本身已经在这样的SpringMVC文件夹结构中确定下来:

我不知道问题从何而来,因为我似乎保持了路径结构,但我在本地环境中遇到了这样的错误。

发布于 2021-06-24 10:05:20
我将/images文件夹移到/static文件夹中,然后像下面这样修复html:
<img th:src="@{/images/icons-alert-circle.png}" />问题已经解决了
https://stackoverflow.com/questions/68112705
复制相似问题