-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jackson: custom ObjectMapper not delegated to MicroProfile RestClient #39981
Comments
This is interesting indeed. Can you attach a sample application that behaves as you describe so we can dig into it? Thanks |
I would also like you know which REST Client extension you are using |
I use the the following quarkus 3.9.2 dependencies:
from my pom.xml:
With the above dependency, the Microprofile Rest Client-extension (microprofile-rest-client-api-3.0.1.jar) is used. |
Okay, please attach a sample application in that case so I can try it out. |
I found the reason when creating the reproducer. It was my fault, I had accidentally used another default mapper (with So there is no bug here. |
Thanks for the update |
Describe the bug
I customized the Quarkus Jackson Object Mapper:
According to #12104 (comment), the
RestClientBuilder.newBuilder()
orQuarkusRestClientBuilder.newBuilder()
(I tried both) should use my customized ObjectMapper. However, this is not the case as I get the exception:Expected behavior
My custom "Quarkus Jackson Object Mapper" should be delegated to
RestClient
when built usingRestClientBuilder.newBuilder()
orQuarkusRestClientBuilder.newBuilder()
.Actual behavior
My custom "Quarkus Jackson Object Mapper" is not delegated to
RestClient
when built usingRestClientBuilder.newBuilder()
orQuarkusRestClientBuilder.newBuilder()
.How to Reproduce?
FAIL_ON_UNKNOWN_PROPERTIES
)RestClient
by using (a)RestClientBuilder.newBuilder()
and (b)QuarkusRestClientBuilder.newBuilder()
.public record User(@JsonProperty("name") String name) {}
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "21.0.2" 2024-01-16
Quarkus version or git rev
3.9.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven
Additional information
No response
The text was updated successfully, but these errors were encountered: