use of com.hubspot.jinjava.JinjavaConfig in project zeppelin by apache.
the class K8sSpecTemplate method render.
public String render(String template) {
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
JinjavaConfig config = JinjavaConfig.newBuilder().withLstripBlocks(true).withTrimBlocks(true).build();
Jinjava jinja = new Jinjava(config);
return jinja.render(template, this);
} finally {
Thread.currentThread().setContextClassLoader(oldCl);
}
}
Aggregations