diff --git a/docs/src/main/asciidoc/rest-json.adoc b/docs/src/main/asciidoc/rest-json.adoc index 1fce2982196c6..62be7a6e4496b 100644 --- a/docs/src/main/asciidoc/rest-json.adoc +++ b/docs/src/main/asciidoc/rest-json.adoc @@ -231,10 +231,9 @@ Failure to do so will prevent Jackson specific customizations provided by variou [source,java] ---- import com.fasterxml.jackson.databind.ObjectMapper; +import io.quarkus.arc.All; import io.quarkus.jackson.ObjectMapperCustomizer; - -import javax.enterprise.inject.Instance; -import javax.enterprise.inject.Produces; +import java.util.List; import javax.inject.Singleton; public class CustomObjectMapper { @@ -242,7 +241,7 @@ public class CustomObjectMapper { // Replaces the CDI producer for ObjectMapper built into Quarkus @Singleton @Produces - ObjectMapper objectMapper(Instance customizers) { + ObjectMapper objectMapper(@All List customizers) { ObjectMapper mapper = myObjectMapper(); // Custom `ObjectMapper` // Apply all ObjectMapperCustomizer beans (incl. Quarkus) diff --git a/docs/src/main/asciidoc/resteasy.adoc b/docs/src/main/asciidoc/resteasy.adoc index 9e6a936527aa0..6a439993512d1 100644 --- a/docs/src/main/asciidoc/resteasy.adoc +++ b/docs/src/main/asciidoc/resteasy.adoc @@ -215,16 +215,16 @@ Failure to do so will prevent Jackson specific customizations provided by variou [source,java] ---- import com.fasterxml.jackson.databind.ObjectMapper; +import io.quarkus.arc.All; import io.quarkus.jackson.ObjectMapperCustomizer; - -import javax.enterprise.inject.Instance; +import java.util.List; import javax.inject.Singleton; public class CustomObjectMapper { // Replaces the CDI producer for ObjectMapper built into Quarkus @Singleton - ObjectMapper objectMapper(Instance customizers) { + ObjectMapper objectMapper(@All List customizers) { ObjectMapper mapper = myObjectMapper(); // Custom `ObjectMapper` // Apply all ObjectMapperCustomizer beans (incl. Quarkus)