【发布时间】:2016-12-27 14:36:06
【问题描述】:
这就是我想做的事情:用户上传一堆 html 文件作为 zip 存档。我解压缩该存档并在网站上显示 html 内容。
为此,我想将 html 内容包含到 thymeleaf 页面中。到目前为止我已经尝试过了:
<div th:include="http://localhost:8181/MySpringApp/uploads/include.html"></div>
<div th:include="@{/uploads/include.html}"></div>
<div th:include="@{~/uploads/include.html}"></div>
在所有三种情况下,我都会收到以下错误(URL 不同):
Exception processing template "dashboard": Error resolving template "/uploads/include.html", template might not exist or might not be accessible by any of the configured Template Resolvers (dashboard:40)
我怎样才能让它发挥作用?我只看到了包含 template 文件夹中的静态文件的示例。但这不是我想做的。
我正在使用 Wildfly 9,并在 standalone/data 文件夹中创建了 uploads 文件夹。
【问题讨论】:
标签: java spring-boot thymeleaf wildfly-9