Replace AggregateNotFoundException with EntityNotFoundException

Proprietary

Axon Framework 5 throws org.axonframework.modelling.repository.EntityNotFoundException where Axon Framework 4 threw AggregateNotFoundException, when a command targets an entity that does not exist. It names the identifier identifier() instead of getAggregateIdentifier(). Axon Framework 5 has no counterpart of AggregateDeletedException, so code that catches it is left for a person to decide.

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

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