From a32c8e3d2317a88bf60e74515b9d955fba508fa9 Mon Sep 17 00:00:00 2001 From: Eric Handtke Date: Fri, 17 Apr 2026 11:07:04 +0200 Subject: [PATCH 1/2] chore: update Jackson imports to tools.jackson for steps 1-5 Update pom.xml and DataInitializer.java across tutorial steps 1-5 to use Jackson 3.x package (tools.jackson) and JsonMapper. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- 1-creating-a-basic-app/pom.xml | 29 ++++++++++++++----- 2-working-with-data/pom.xml | 29 ++++++++++++++----- .../tutorial/config/DataInitializer.java | 7 +++-- 3-routing-and-composites/pom.xml | 26 +++++++++++++---- .../tutorial/config/DataInitializer.java | 7 +++-- 4-observers-and-route-parameters/pom.xml | 26 +++++++++++++---- .../tutorial/config/DataInitializer.java | 7 +++-- 5-validating-and-binding-data/pom.xml | 26 +++++++++++++---- .../tutorial/config/DataInitializer.java | 7 +++-- 9 files changed, 118 insertions(+), 46 deletions(-) diff --git a/1-creating-a-basic-app/pom.xml b/1-creating-a-basic-app/pom.xml index 1ec57bd..e254cb2 100644 --- a/1-creating-a-basic-app/pom.xml +++ b/1-creating-a-basic-app/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.4 + 4.0.5 com.webforj.tutorial @@ -13,7 +13,8 @@ 1.0-SNAPSHOT CustomerApplication - 25.10 + 21 + 26.00-SNAPSHOT 21 21 UTF-8 @@ -30,11 +31,6 @@ - - com.webforj - webforj - ${webforj.version} - com.webforj webforj-spring-boot-starter @@ -94,9 +90,26 @@ true + + org.openrewrite.maven + rewrite-maven-plugin + 6.36.0 + + + com.webforj.rewrite.v26.UpgradeWebforjSpring + + + + + com.webforj + webforj-rewrite + 26.00-SNAPSHOT + + + maven-failsafe-plugin - 3.0.0-M7 + 3.5.5 diff --git a/2-working-with-data/pom.xml b/2-working-with-data/pom.xml index dbee744..1f657c9 100644 --- a/2-working-with-data/pom.xml +++ b/2-working-with-data/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.4 + 4.0.5 com.webforj.tutorial @@ -13,7 +13,8 @@ 1.0-SNAPSHOT CustomerApplication - 25.10 + 21 + 26.00-SNAPSHOT 21 21 UTF-8 @@ -30,11 +31,6 @@ - - com.webforj - webforj - ${webforj.version} - com.webforj webforj-spring-boot-starter @@ -95,6 +91,23 @@ spring-boot:run + + org.openrewrite.maven + rewrite-maven-plugin + 6.36.0 + + + com.webforj.rewrite.v26.UpgradeWebforjSpring + + + + + com.webforj + webforj-rewrite + 26.00-SNAPSHOT + + + org.springframework.boot spring-boot-maven-plugin @@ -104,7 +117,7 @@ maven-failsafe-plugin - 3.0.0-M7 + 3.5.5 diff --git a/2-working-with-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java b/2-working-with-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java index 6965a93..a52eea0 100644 --- a/2-working-with-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java +++ b/2-working-with-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java @@ -1,7 +1,8 @@ package com.webforj.tutorial.config; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.webforj.tutorial.entity.Customer; import com.webforj.tutorial.service.CustomerService; import org.springframework.boot.CommandLineRunner; @@ -26,7 +27,7 @@ public void run(String... args) { } private void loadCustomersFromJson() { - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new JsonMapper(); try (InputStream is = getClass().getResourceAsStream("/data/customers.json")) { List customers = mapper.readValue(is, new TypeReference>() { }); diff --git a/3-routing-and-composites/pom.xml b/3-routing-and-composites/pom.xml index f0edd55..9b0df53 100644 --- a/3-routing-and-composites/pom.xml +++ b/3-routing-and-composites/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.4 + 4.0.5 com.webforj.tutorial @@ -13,7 +13,8 @@ 1.0-SNAPSHOT CustomerApplication - 25.10 + 21 + 26.00-SNAPSHOT 21 21 UTF-8 @@ -30,10 +31,6 @@ - - com.webforj - webforj - com.webforj webforj-spring-boot-starter @@ -94,6 +91,23 @@ spring-boot:run + + org.openrewrite.maven + rewrite-maven-plugin + 6.36.0 + + + com.webforj.rewrite.v26.UpgradeWebforjSpring + + + + + com.webforj + webforj-rewrite + 26.00-SNAPSHOT + + + org.springframework.boot spring-boot-maven-plugin diff --git a/3-routing-and-composites/src/main/java/com/webforj/tutorial/config/DataInitializer.java b/3-routing-and-composites/src/main/java/com/webforj/tutorial/config/DataInitializer.java index 6965a93..a52eea0 100644 --- a/3-routing-and-composites/src/main/java/com/webforj/tutorial/config/DataInitializer.java +++ b/3-routing-and-composites/src/main/java/com/webforj/tutorial/config/DataInitializer.java @@ -1,7 +1,8 @@ package com.webforj.tutorial.config; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.webforj.tutorial.entity.Customer; import com.webforj.tutorial.service.CustomerService; import org.springframework.boot.CommandLineRunner; @@ -26,7 +27,7 @@ public void run(String... args) { } private void loadCustomersFromJson() { - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new JsonMapper(); try (InputStream is = getClass().getResourceAsStream("/data/customers.json")) { List customers = mapper.readValue(is, new TypeReference>() { }); diff --git a/4-observers-and-route-parameters/pom.xml b/4-observers-and-route-parameters/pom.xml index f0edd55..9b0df53 100644 --- a/4-observers-and-route-parameters/pom.xml +++ b/4-observers-and-route-parameters/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.4 + 4.0.5 com.webforj.tutorial @@ -13,7 +13,8 @@ 1.0-SNAPSHOT CustomerApplication - 25.10 + 21 + 26.00-SNAPSHOT 21 21 UTF-8 @@ -30,10 +31,6 @@ - - com.webforj - webforj - com.webforj webforj-spring-boot-starter @@ -94,6 +91,23 @@ spring-boot:run + + org.openrewrite.maven + rewrite-maven-plugin + 6.36.0 + + + com.webforj.rewrite.v26.UpgradeWebforjSpring + + + + + com.webforj + webforj-rewrite + 26.00-SNAPSHOT + + + org.springframework.boot spring-boot-maven-plugin diff --git a/4-observers-and-route-parameters/src/main/java/com/webforj/tutorial/config/DataInitializer.java b/4-observers-and-route-parameters/src/main/java/com/webforj/tutorial/config/DataInitializer.java index 6965a93..a52eea0 100644 --- a/4-observers-and-route-parameters/src/main/java/com/webforj/tutorial/config/DataInitializer.java +++ b/4-observers-and-route-parameters/src/main/java/com/webforj/tutorial/config/DataInitializer.java @@ -1,7 +1,8 @@ package com.webforj.tutorial.config; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.webforj.tutorial.entity.Customer; import com.webforj.tutorial.service.CustomerService; import org.springframework.boot.CommandLineRunner; @@ -26,7 +27,7 @@ public void run(String... args) { } private void loadCustomersFromJson() { - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new JsonMapper(); try (InputStream is = getClass().getResourceAsStream("/data/customers.json")) { List customers = mapper.readValue(is, new TypeReference>() { }); diff --git a/5-validating-and-binding-data/pom.xml b/5-validating-and-binding-data/pom.xml index f0edd55..9b0df53 100644 --- a/5-validating-and-binding-data/pom.xml +++ b/5-validating-and-binding-data/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.4 + 4.0.5 com.webforj.tutorial @@ -13,7 +13,8 @@ 1.0-SNAPSHOT CustomerApplication - 25.10 + 21 + 26.00-SNAPSHOT 21 21 UTF-8 @@ -30,10 +31,6 @@ - - com.webforj - webforj - com.webforj webforj-spring-boot-starter @@ -94,6 +91,23 @@ spring-boot:run + + org.openrewrite.maven + rewrite-maven-plugin + 6.36.0 + + + com.webforj.rewrite.v26.UpgradeWebforjSpring + + + + + com.webforj + webforj-rewrite + 26.00-SNAPSHOT + + + org.springframework.boot spring-boot-maven-plugin diff --git a/5-validating-and-binding-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java b/5-validating-and-binding-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java index 6965a93..a52eea0 100644 --- a/5-validating-and-binding-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java +++ b/5-validating-and-binding-data/src/main/java/com/webforj/tutorial/config/DataInitializer.java @@ -1,7 +1,8 @@ package com.webforj.tutorial.config; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.webforj.tutorial.entity.Customer; import com.webforj.tutorial.service.CustomerService; import org.springframework.boot.CommandLineRunner; @@ -26,7 +27,7 @@ public void run(String... args) { } private void loadCustomersFromJson() { - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new JsonMapper(); try (InputStream is = getClass().getResourceAsStream("/data/customers.json")) { List customers = mapper.readValue(is, new TypeReference>() { }); From 47a7cad1769a876ffdfffdaf79050cbdaf9ad5d2 Mon Sep 17 00:00:00 2001 From: Eric Handtke Date: Fri, 17 Apr 2026 12:58:13 +0200 Subject: [PATCH 2/2] Updated with webforj-rewrite --- 6-integrating-an-app-layout/pom.xml | 26 ++++++++++++++----- .../tutorial/config/DataInitializer.java | 7 ++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/6-integrating-an-app-layout/pom.xml b/6-integrating-an-app-layout/pom.xml index f0edd55..9b0df53 100644 --- a/6-integrating-an-app-layout/pom.xml +++ b/6-integrating-an-app-layout/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 3.5.4 + 4.0.5 com.webforj.tutorial @@ -13,7 +13,8 @@ 1.0-SNAPSHOT CustomerApplication - 25.10 + 21 + 26.00-SNAPSHOT 21 21 UTF-8 @@ -30,10 +31,6 @@ - - com.webforj - webforj - com.webforj webforj-spring-boot-starter @@ -94,6 +91,23 @@ spring-boot:run + + org.openrewrite.maven + rewrite-maven-plugin + 6.36.0 + + + com.webforj.rewrite.v26.UpgradeWebforjSpring + + + + + com.webforj + webforj-rewrite + 26.00-SNAPSHOT + + + org.springframework.boot spring-boot-maven-plugin diff --git a/6-integrating-an-app-layout/src/main/java/com/webforj/tutorial/config/DataInitializer.java b/6-integrating-an-app-layout/src/main/java/com/webforj/tutorial/config/DataInitializer.java index 6965a93..a52eea0 100644 --- a/6-integrating-an-app-layout/src/main/java/com/webforj/tutorial/config/DataInitializer.java +++ b/6-integrating-an-app-layout/src/main/java/com/webforj/tutorial/config/DataInitializer.java @@ -1,7 +1,8 @@ package com.webforj.tutorial.config; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.core.type.TypeReference; +import tools.jackson.databind.ObjectMapper; +import tools.jackson.databind.json.JsonMapper; import com.webforj.tutorial.entity.Customer; import com.webforj.tutorial.service.CustomerService; import org.springframework.boot.CommandLineRunner; @@ -26,7 +27,7 @@ public void run(String... args) { } private void loadCustomersFromJson() { - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new JsonMapper(); try (InputStream is = getClass().getResourceAsStream("/data/customers.json")) { List customers = mapper.readValue(is, new TypeReference>() { });