2016-03-29 82 views
0

我使用SpringBoot 1.3.3.RELEASE和Thymeleaf与IntelliJ作为我的ide。我得到这个错误:SpringBoot Thymeleaf不解决模板

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "footer.html", template might not exist or might not be accessible by any of the configured Template Resolvers (about:102) 

我有这样的项目布局: enter image description here

我使用的about.html文件此导入:

<div th:replace="footer.html"></div> 

我不能让它通过IntelliJ或SpringBoot Maven插件工作。我正在使用嵌入式Tomcat来运行此项目。我试图把该片段到一个片段文件夹下的模板,也可以此

<div th:fragment="footer.html"></div> 

任何帮助,将不胜感激。

回答

2

您的footer.html的外观如何? 如果你想使用你有一个片段那样做:

<div th:replace="footer :: fragmentName"></div> 

里面footer.html你会像

<div th:fragment="fragmentName">Hello World</div> 
相关问题