From 35000c41de51adbeed0007ae56a294318d4f3fca Mon Sep 17 00:00:00 2001 From: Andreas Hager Date: Sat, 6 Mar 2021 08:33:51 +0100 Subject: [PATCH] Update DOCUMENTATION.md --- DOCUMENTATION.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 7fe8e2be..d812ff17 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -577,6 +577,23 @@ tasks.test { } ``` +In case you would like to build a self-contained JAR, you can add this to your build.gradle: + +```groovy +from fileTree("jte-classes") { + include "**/*.class" + include "**/*.bin" // Only required if you use binary templates +} +``` + +And init the template engine like this for production builds: + +```java +TemplateEngine templateEngine = TemplateEngine.createPrecompiled(ContentType.Html); +``` + +This way the templates are loaded from the application class loader. + ### Using the application class loader (since 1.2.0)