ObjectMapperCustomizer not working with JAX-RS client
See original GitHub issueDescribe the bug
When using the JAX-RS client obtained through JAX-RS’ ClientBuilder
(e.g. ClientBuilder.newClient()
) any custom ObjectMapperCustomizer
s are not respected as they are with the MicroProfile REST client.
Expected behavior
The ObjectMapper
used by a JAX-RS client constructed using ClientBuilder.newClient()
should also have been customized by any registered ObjectMapperCustomizer
s.
Actual behavior
For a reproducible example see https://github.com/knutwannheden/quarkus-bug-jaxrs-object-mapper, where the ObjectMapper
is customized by calling objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
. The repo contains a test case demonstrating that this works as expected for MicroProfile REST client but fails with the JAX-RS client.
To Reproduce Steps to reproduce the behavior:
git clone https://github.com/knutwannheden/quarkus-bug-jaxrs-object-mapper
cd quarkus-bug-jaxrs-object-mapper/
mvn clean verify
Environment (please complete the following information):
- Output of
uname -a
orver
: MSYS_NT-10.0-19042 DESKTOP-HR8N4ES 3.1.4-340.x86_64 2020-05-19 12:55 UTC x86_64 Msys - Output of
java -version
: openjdk version “11.0.7” 2020-04-14 LTS - GraalVM version (if different from Java):
- Quarkus version or git rev: 1.8.0.CR1
- Build tool (ie. output of
mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top GitHub Comments
I will have a look tomorrow. It bugs me.
I am going to close this as this should work properly with managed
quarkus-jaxrs-client-reactive