ObjectMapper used by Jackson2JsonDecoder doesn't pick up jackson-parameter-names module [SPR-14864] #19430
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
Dominic Fox opened SPR-14864 and commented
The
Jackson2JsonDecoder
cannot decode aFlux<Foo>
whereFoo
is a class initialised with a constructor or static method annotated with@JsonCreator
and thejackson-module-parameter-names
module is used to bind parameter names directly to property names without the use of further annotations.I've verified that the
ObjectMapper
in the Spring Application Context has been configured with thejackson-module-parameter-names
module, and that this works as expected (given that the-parameters
compiler flag has been set). However, theJackson2JsonDecoder
appears to be initialised with a differentObjectMapper
.See the attached
ThingController
class for an example. When you postto the
/things
endpoint, a415
HTTP Status Code is returned. There is no indication in either the error message or the stack trace that the problem is actually in the JSON deserialisation.Stack trace below. (The Reactor Framework does seem to result in rather convoluted and unhelpful stack traces...)
Affects: 5.0 M2
Attachments:
The text was updated successfully, but these errors were encountered: