Skip to content

Commit

Permalink
fixed pebble engine
Browse files Browse the repository at this point in the history
  • Loading branch information
kamenitxan committed Jul 6, 2023
1 parent 432b35d commit f3a8a15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbtassembly.AssemblyPlugin.autoImport.assembly

val V = new {
val Scala = "3.3.0"
val jakon = "0.5.4"
val jakon = "0.5.5"
val spark = "2.9.4-JAKON.2"
val log4j = "2.20.0"
val circeVersion = "0.14.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ class JakonPebbleTemplateEngine extends spark.TemplateEngine {
*/
def this(loader: Loader[_]) = {
this()
val builder = new PebbleEngine.Builder().loader(loader).extension(new AdminPebbleExtension)
val builder = new PebbleEngine.Builder()
.loader(loader)
.extension(new AdminPebbleExtension)
.methodAccessValidator(new JakonMethodAccessValidator)
if (DeployMode.PRODUCTION != Settings.getDeployMode) {
builder.templateCache(null)
builder.tagCache(null)
builder.cacheActive(false)
builder.methodAccessValidator(new JakonMethodAccessValidator)
}
this.engine = builder.build
}
Expand Down

0 comments on commit f3a8a15

Please sign in to comment.