Skip to content

Commit

Permalink
[enhancement] any directory can use as template directory
Browse files Browse the repository at this point in the history
  • Loading branch information
parhamahmady committed Jan 8, 2022
1 parent 397d86d commit 3748641
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public String getName() {

private com.github.jknack.handlebars.Template getHandlebars(String templateFile) throws IOException {
templateFile = templateFile.replace(".mustache", StringUtils.EMPTY).replace("\\", "/");
final String templateDir = config.templateDir().replace("\\", "/");
final TemplateLoader templateLoader;
String templateDir = config.customTemplateDir() != null ? "" : "handlebars/JavaSpring/";
String customTemplateDir = config.customTemplateDir() != null ? config.customTemplateDir().replace("\\", "/") : null;
final TemplateLoader templateLoader;
templateFile = resolveTemplateFile(templateDir, templateFile);
templateLoader = new CodegenTemplateLoader("/" + templateDir, ".mustache")
.customTemplateDir(customTemplateDir);
Expand Down

0 comments on commit 3748641

Please sign in to comment.