From 3cb2c6d127b8b15bd9df561ecb533c221166c1d3 Mon Sep 17 00:00:00 2001 From: "pactflow-renovate-bot[bot]" <186667433+pactflow-renovate-bot[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 17:26:59 +0000 Subject: [PATCH 1/2] chore(deps): update plugin org.springframework.boot to v4 Ref: PACT-445 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d0d2a86..dfc471f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'org.springframework.boot' version '3.5.14' + id 'org.springframework.boot' version '4.0.6' id 'io.spring.dependency-management' version '1.1.7' id 'java' id "au.com.dius.pact" version "4.7.0" From 514e91a323494ff0f37cb8b0ec92f0bb8cf0b9f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 3 May 2026 23:33:13 +0000 Subject: [PATCH 2/2] fix: address Spring Boot 4.0 breaking changes - Remove io.spring.dependency-management plugin (dropped in Spring Boot 4.x) - Add Spring Boot BOM via platform() for dependency version management - Update Jackson imports from com.fasterxml.jackson.databind to tools.jackson.databind (Jackson 3.x package rename) - Remove JsonMappingException catch block (removed in Jackson 3.x; JacksonException extends IOException directly) Agent-Logs-Url: https://github.com/pactflow/example-consumer-java-graphql/sessions/826944fa-bb72-469a-9889-ef932a73abf4 Co-authored-by: JP-Ellis <3196162+JP-Ellis@users.noreply.github.com> --- build.gradle | 2 +- .../java/com/example/products/ProductClient.java | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index dfc471f..46d0346 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,5 @@ plugins { id 'org.springframework.boot' version '4.0.6' - id 'io.spring.dependency-management' version '1.1.7' id 'java' id "au.com.dius.pact" version "4.7.0" id "io.freefair.lombok" version "9.4.0" @@ -17,6 +16,7 @@ repositories { } dependencies { + implementation platform('org.springframework.boot:spring-boot-dependencies:4.0.6') implementation 'org.springframework.boot:spring-boot-starter-web' implementation "org.apache.httpcomponents:fluent-hc:4.5.14" implementation 'com.graphql-java:graphql-java:25.0' diff --git a/src/main/java/com/example/products/ProductClient.java b/src/main/java/com/example/products/ProductClient.java index 9ced746..269cb19 100644 --- a/src/main/java/com/example/products/ProductClient.java +++ b/src/main/java/com/example/products/ProductClient.java @@ -3,8 +3,7 @@ import org.apache.http.client.fluent.Request; import org.apache.http.entity.ContentType; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; +import tools.jackson.databind.ObjectMapper; import java.io.IOException; import java.net.URISyntaxException; @@ -34,14 +33,9 @@ public Product getProduct(String id) throws IOException, URISyntaxException { .bodyString(query, ContentType.APPLICATION_JSON) .addHeader("Accept", "application/json") .execute().handleResponse(httpResponse -> { - try { - ObjectMapper mapper = new ObjectMapper(); - Response response = mapper.readValue(httpResponse.getEntity().getContent(), Response.class); - return response.getData().getProduct(); - - } catch (JsonMappingException e) { - throw new IOException(e); - } + ObjectMapper mapper = new ObjectMapper(); + Response response = mapper.readValue(httpResponse.getEntity().getContent(), Response.class); + return response.getData().getProduct(); }); } } \ No newline at end of file