spring-projects / spring-projects/spring-modulith
`DayHasPassed` not JSON-serializable
Open
@odrotbohm is already working on this.
Since Nov 25, 2025.
in: event publication registry
in: moments
resolution: duplicate
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 222
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.