perwendel / spark-template-engines

Repository for different Template engine implementations.
Apache License 2.0
134 stars 101 forks source link

Template inheritance/include does not work in jar #82

Open khoa-incepIT opened 5 years ago

khoa-incepIT commented 5 years ago

By default, SparkClasspathTemplateLoader root will have a "File separator" at the end like "templates/". When the engine renders a template that inherits or includes other templates with path like "/base_templates/base_layout", it will get the resource at path like "templates//base_template/base_layout". This will work if it is run inside of IDEA however when run as a jar file, the double slashes "//" cause NullPointerException.