Skip to content

KotlinModule is not registered in jackson3 #4545

@rsobies

Description

@rsobies

Basic information

When switching from jackson to jackson3 serialization start working diffrently for kotlin, KotlinModule is not registrer in JsonMapper
this lead to serialization:

val isTrueFalse: Boolean -> "trueFalse"

  • Axon Framework version: 4.13.1

Expected behaviour

val isTrueFalse:Boolen -> "isTrueFalse"

Description

In the class JacksonSerializer objectMapper is passed from spring context to builder, so when KotlinModule is alredy registered in spring, serialization works correctly
but class Jackson3Serializer doesn't accept objectMapper from spring like it is in JacksonSerializer. It create new instance of JsonMapper so user has to add KotlinModule manually via Jackson3SerializerCustomizer despite it is registered in spring objectMapper

Solution

Allow passing objectMapper parameter to Jackson3Serializer

Metadata

Metadata

Assignees

Labels

Priority 2: ShouldHigh priority. Ideally, these issues are part of the release they’re assigned to.
No fields configured for Enhancement.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions