From 8ef501ca943d850af8c67c6498a215ce2832ef09 Mon Sep 17 00:00:00 2001 From: Karavani Lillmannstons Date: Mon, 20 Jan 2020 21:36:33 +0200 Subject: [PATCH 1/3] upgrade templates to latest version --- pom.xml | 24 ++++++++++--------- .../mitchellbosecke/benchmark/Freemarker.java | 2 +- .../resources/templates/stocks.thymeleaf.html | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 8bb67c5..4f595df 100644 --- a/pom.xml +++ b/pom.xml @@ -11,18 +11,20 @@ UTF-8 - 1.11.2 + 1.22 benchmarks - 2.2.0 - 0.9.1 - 2.3.23 + 2.4.0 + 0.9.6 + 2.3.29 1.7 - 2.1.4.RELEASE + 3.0.11.RELEASE 4.12 - 1.8.2.Final - 4.0.1 - 0.10.3 + 2.5.0.Final + 4.1.2 + 1.2.2 + + @@ -45,10 +47,10 @@ maven-compiler-plugin - 3.1 + 3.8.1 - 1.7 - 1.7 + 1.8 + 1.8 diff --git a/src/main/java/com/mitchellbosecke/benchmark/Freemarker.java b/src/main/java/com/mitchellbosecke/benchmark/Freemarker.java index 8e5d965..1c80afb 100644 --- a/src/main/java/com/mitchellbosecke/benchmark/Freemarker.java +++ b/src/main/java/com/mitchellbosecke/benchmark/Freemarker.java @@ -21,7 +21,7 @@ public class Freemarker extends BaseBenchmark { @Setup public void setup() throws IOException { - Configuration configuration = new Configuration(Configuration.VERSION_2_3_22); + Configuration configuration = new Configuration(Configuration.VERSION_2_3_29); configuration.setTemplateLoader(new ClassTemplateLoader(getClass(), "/")); template = configuration.getTemplate("templates/stocks.freemarker.html"); this.context = getContext(); diff --git a/src/main/resources/templates/stocks.thymeleaf.html b/src/main/resources/templates/stocks.thymeleaf.html index a1667f6..9bb4d8a 100755 --- a/src/main/resources/templates/stocks.thymeleaf.html +++ b/src/main/resources/templates/stocks.thymeleaf.html @@ -55,7 +55,7 @@

Stock Prices

+ th:class="${itemStat.odd}? 'odd' : 'even'"> From 3bbb46860923f656001cbed330ef1ddc7e247ea9 Mon Sep 17 00:00:00 2001 From: Karavani Lillmannstons Date: Mon, 20 Jan 2020 21:59:24 +0200 Subject: [PATCH 2/3] upgrade pabble version --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4f595df..06611c5 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 1.22 benchmarks - 2.4.0 + 3.1.2 0.9.6 2.3.29 1.7 @@ -123,7 +123,7 @@ - com.mitchellbosecke + io.pebbletemplates pebble ${pebble.version} From 317590d14b27828a88575c50a860c017aa20b63e Mon Sep 17 00:00:00 2001 From: Karavani Lillmannstons Date: Mon, 20 Jan 2020 22:12:43 +0200 Subject: [PATCH 3/3] upgrade velocity template --- pom.xml | 4 ++-- src/main/resources/templates/stocks.velocity.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 06611c5..c9fb67b 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ 3.1.2 0.9.6 2.3.29 - 1.7 + 2.1 3.0.11.RELEASE 4.12 2.5.0.Final @@ -139,7 +139,7 @@ org.apache.velocity - velocity + velocity-engine-core ${velocity.version} diff --git a/src/main/resources/templates/stocks.velocity.html b/src/main/resources/templates/stocks.velocity.html index c3217ce..ab02f8a 100755 --- a/src/main/resources/templates/stocks.velocity.html +++ b/src/main/resources/templates/stocks.velocity.html @@ -54,9 +54,9 @@

Stock Prices

#foreach($item in $items) - #if($velocityCount % 2 == 0) #set($klass = "even") #else #set($klass = "odd") #end + #if($foreach.count % 2 == 0) #set($klass = "even") #else #set($klass = "odd") #end - ${velocityCount} + ${foreach.count} ${item.symbol}