While stepping through the code I noticed that the Jackson2JsonDecoder.getDecodableMimeTypes() and Jackson2JsonEncoder.getEncodableMimeTypes() methods always return the default JSON mime types, not the one(s) provided as constructor argument.
hi, small correction. The Jackson2CodecSupport.supportsMimeType method does refer to the list of configured mime types. It's getDecodableMimeTypes and getEncodableMimeTypes that are effectively hard-coded. As a result the BodyExtractors on the client side and the argument resolver on the server side do not perform content negotiation correctly, which is why I also don't follow the comment that it works when using the WebClient.Builder.
Regardless of this, there is an actual issue and the fix looks right. I will however adjust the tests to verify what is actually failing.
small correction. The Jackson2CodecSupport.supportsMimeType method does refer to the list of configured mime types
Yes, this was an incorrect observation by me. I modified my pull request comment but forgot to update it here as well.