Skip to content

DayHasPassed not JSON-serializable #1480

@ivanfryda

Description

@ivanfryda

In Spring Modulith 1 I was doing:

@ApplicationModuleListener
public void on(DayHasPassed dayHasPassed) {

After migrating to Modulith 2 I get:

tools.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of org.springframework.modulith.moments.DayHasPassed (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

Is there any recommended way of getting Moments events serialized or is this something discouraged and I should use the in-memory EventListener mechanism?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions