Annotate the generated no-argument constructor of an event-sourced entity with @EntityCreator

Proprietary

Axon Framework 5 creates an event-sourced entity only through a constructor or method annotated with @EntityCreator, and fails at startup without one. AxonIQ's recipes annotate the no-argument constructor an aggregate declares. An @EventSourced or @EventSourcedEntity class without an @EntityCreator gets onConstructor_ = @EntityCreator on its Lombok @NoArgsConstructor, or, when it declares no constructor and Lombok generates none, a public no-argument constructor annotated with @EntityCreator.

io.moderne.axon.AddEntityCreatorToDefaultConstructor
mod run . --recipe=io.moderne.axon.AddEntityCreatorToDefaultConstructor

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.