我这里使用index.ftl 和 button.ftl,并且在同一级目录
button.ftl就是一个生成简单的a标签按钮
spring中配置文件,
<prop key="auto_import">/macro/index.ftl as ui</prop>
我在index.ftl中使用include:
<#include "button.ftl"/>
提示:
java.io.FileNotFoundException: Template button.ftl not found.
但是我把button.ftl拷贝到index.ftl中时,就能正常使用,所以就很难理解,使用include为什么会出现找到不模板的问题
建议使用绝对路径试试
没找到文件,检查路径,拼写,空格等问题
<#include "/in/button.ftl"/>
在同一路径下加一个他们的包名试试