FTL stack trace (“~“ means nesting-related): - Failed at: #include “../common.ftl“ 报错解决

后端报错:

Template not found for name "../common.ftl".
Reason given: Backing out from the root directory is not allowed.
The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="D:\WorkSpace\IdeaWorkSpace\CRM\target\classes\views", canonicalBasePath="D:\WorkSpace\IdeaWorkSpace\CRM\target\classes\views\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)).

----
FTL stack trace ("~" means nesting-related):
    - Failed at: #include "../common.ftl"  [in template "module/module.ftl" at line 5, column 5]
----] as the response has already been committed. As a result, the response may have the wrong status code.

前端错误回显

FreeMarker template error (DEBUG mode; use RETHROW in production!): Template inclusion failed (for parameter value "../common.ftl"): Template not found for name "../common.ftl". Reason given: Backing out from the root directory is not allowed. The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = FileTemplateLoader(baseDir="D:\WorkSpace\IdeaWorkSpace\CRM\target\classes\views", canonicalBasePath="D:\WorkSpace\IdeaWorkSpace\CRM\target\classes\views\"), loader2 = ClassTemplateLoader(resourceLoaderClass=org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer, basePackagePath="" /* relatively to resourceLoaderClass pkg */)). ---- FTL stack trace ("~" means nesting-related): - Failed at: #include "../common.ftl" [in template "module/module.ftl" at line 5, column 5] ---- Java stack trace (for programmers): ----

.....

解决方法:

不要使用 <#include "../common.ftl"> 在当前页面中直接使用common里面的引用,不要通过common.ftl,虽然其它的文件里面就不会报错... 

FTL stack trace (“~“ means nesting-related): - Failed at: #include “../common.ftl“ 报错解决_第1张图片

FTL stack trace (“~“ means nesting-related): - Failed at: #include “../common.ftl“ 报错解决_第2张图片

你可能感兴趣的:(hive,hadoop,数据仓库)