From f29a00f1a7bfd3847f3cc311b7006644340f01ac Mon Sep 17 00:00:00 2001 From: mariofusco Date: Mon, 15 Jan 2024 15:23:04 +0100 Subject: [PATCH] Use Vert.x pool with Jackson --- bom/application/pom.xml | 2 +- extensions/jackson/runtime/pom.xml | 4 ++++ .../java/io/quarkus/jackson/runtime/ObjectMapperProducer.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 894ac585a55373..62c3aab77731af 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -121,7 +121,7 @@ 1.0.1.Final 2.2.2.Final 3.5.1.Final - 4.5.1 + 4.5.2-SNAPSHOT 4.5.14 4.4.16 4.1.5 diff --git a/extensions/jackson/runtime/pom.xml b/extensions/jackson/runtime/pom.xml index c382137d4dd66a..f997f902f92344 100644 --- a/extensions/jackson/runtime/pom.xml +++ b/extensions/jackson/runtime/pom.xml @@ -33,6 +33,10 @@ io.quarkus quarkus-arc + + io.vertx + vertx-core + diff --git a/extensions/jackson/runtime/src/main/java/io/quarkus/jackson/runtime/ObjectMapperProducer.java b/extensions/jackson/runtime/src/main/java/io/quarkus/jackson/runtime/ObjectMapperProducer.java index 0675633a7e99e6..bb47e5817c40ec 100644 --- a/extensions/jackson/runtime/src/main/java/io/quarkus/jackson/runtime/ObjectMapperProducer.java +++ b/extensions/jackson/runtime/src/main/java/io/quarkus/jackson/runtime/ObjectMapperProducer.java @@ -19,6 +19,7 @@ import io.quarkus.arc.All; import io.quarkus.arc.DefaultBean; import io.quarkus.jackson.ObjectMapperCustomizer; +import io.vertx.core.json.jackson.HybridJacksonPool; @ApplicationScoped public class ObjectMapperProducer { @@ -63,6 +64,7 @@ public ObjectMapper objectMapper(@All List customizers, for (ObjectMapperCustomizer customizer : sortedCustomizers) { customizer.customize(objectMapper); } + objectMapper.getFactory().setRecyclerPool(HybridJacksonPool.getInstance()); return objectMapper; }