Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit 9d708ff

Browse files
xingzilinwumingshi
authored andcommitted
feat: set classloader
1 parent e466881 commit 9d708ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/ly/doc/utils/BeetlTemplateUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public static Template getByName(String templateName) {
6262
ClasspathResourceLoader resourceLoader = new ClasspathResourceLoader("/template/");
6363
Configuration cfg = Configuration.defaultConfiguration();
6464
cfg.add("/smart-doc-beetl.properties");
65+
Thread.currentThread().setContextClassLoader(GroupTemplate.class.getClassLoader());
6566
GroupTemplate gt = new GroupTemplate(resourceLoader, cfg);
6667
if (templateName.endsWith(HTML_SUFFIX)) {
6768
gt.setEngine(new HtmlCompressTemplateEngine());

0 commit comments

Comments
 (0)