Search code examples
spring-bootfreemarker

import spring.ftl cannout found


i'm upgrade my project from old boot 1.x to 2.3.12, and almost done but one thing is make problem.

In this project i used freemarker, so upgrade boot and used starter-freemarker.

server is going right well, but approach to some ftl page there's error that

cannout found in basePackagePath="/templates/" spring.ftl

I think some configuration is deny to approach library's ftl file, but there's no one get some trouble like me.

does anyone know about this?

thx.


Solution

  • I guess something replaces the TemplateLoader that Spring sets in the FreeMarker Configuration object. Spring used to set a MultiTemplateLoader, with one of the nested TemplateLoader-s loading from the classpath, with org/springframework/web/servlet/view/freemarker as the base.