从类路径外部的文件夹加载freemarker模板

4

我正在将以下配置添加到我的项目中:

#freemarker
spring.freemarker.prefer-file-system-access=true
spring.freemarker.template-loader-path=/Users/leo/dev/project/templates/

Spring加载告诉我路径不存在,但实际上它存在。

2016-12-30 11:47:09.791  WARN 3430 --- [           main] o.s.b.a.f.FreeMarkerAutoConfiguration    : Cannot find template location(s): [/Users/leo/dev/project/templates/] (please add some templates, check your FreeMarker configuration, or set spring.freemarker.checkTemplateLocation=false)

如果我使用标准配置,它可以正常工作。
#freemarker
spring.freemarker.template-loader-path=classpath:/templates/
1个回答

4

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接