You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a POC with the following dependencies
com.sparkjava spark-core 2.5
com.sparkjava spark-template-freemarker 2.5.5
I took the example from this repo, the FreeMarkerEngine class. I have the simple Main class and a simple template with a placeholder for the message.
The issue is that in the Main class there is a comment saying that the template will be loaded from src/test/resources/spark/template/freemarker but this is not configured in the FreeMarkerEngine class at line 89 configuration.setClassForTemplateLoading(FreeMarkerEngine.class, "");
The second argument should be "spark\template\freemarker".
The text was updated successfully, but these errors were encountered:
This line is exactly like it supposed to be. This empty string is base package for getResource() of selected class loader. In this case FreeMarker will execute something like: FreeMarkerEngine.class.getClassLoader().getResource (basePackage + ...)
I have a POC with the following dependencies
com.sparkjava spark-core 2.5
com.sparkjava spark-template-freemarker 2.5.5
I took the example from this repo, the FreeMarkerEngine class. I have the simple Main class and a simple template with a placeholder for the message.
The issue is that in the Main class there is a comment saying that the template will be loaded from src/test/resources/spark/template/freemarker but this is not configured in the FreeMarkerEngine class at line 89 configuration.setClassForTemplateLoading(FreeMarkerEngine.class, "");
The second argument should be "spark\template\freemarker".
The text was updated successfully, but these errors were encountered: