Package org.axonframework.migration
package org.axonframework.migration
-
ClassDescriptionAdds
@AfterEach void tearDown() { <fixture>.stop(); }to test classes that declare a field of typeAxonTestFixturebut have no existing@AfterEach(and no method already namedtearDown).Scans for methods annotated with@CommandHandlerand annotates their command parameter types with@Command.Adds the@EntityCreatorannotation to existing no-arg constructors of classes annotated with either@EventSourcedEntity(free AF5) or the Spring stereotype@EventSourced.Scans for methods annotated with@EventSourcingHandlerand annotates their event payload types with@Event.Adds@EventTag(key = "<EntitySimpleName>")to the aggregate-identifier field of every event class used in@EventSourcingHandlermethods.Maps event-class FQN → scan result needed to place@EventTag.Spring-Boot-only advisory recipe for the AF4 → AF5 sequencing-policy migration.Unwraps Axon Framework 4ResponseTypeswrappers on AF5-shape (typed-payload, two-argument)J.MethodInvocationcalls againstQueryGateway.Adds explicittagKeyandidTypeattributes to@EventSourcedannotations that do not yet configure them.RecordsenclosingClassFqn → idTypeFqnfor every@AggregateIdentifierfield.Kotlin counterpart toConvertCommandHandlerConstructorToStaticMethod.Rewrites Axon Framework 4@CommandHandlerconstructors into statichandlemethods, the AF5 idiom for "creational" command handlers.Rewrites the AF4 aggregate-fixture constructor expressionnew AggregateTestFixture<X>(X.class)(or its diamond form) to the AF5 fluent factory:Rewrites AF4AggregateTestFixturetest method bodies to the AF5AxonTestFixturefluent given/when/then API.Migrates an Axon Framework 4 event-handling component that dispatches commands via a class-levelCommandGatewayfield to the AF5 in-handler pattern: a method-parameterCommandDispatcher.Rewrites Kotlin DSL Spring Dependency ManagementmavenBom(...)imports whose version is supplied via Kotlin string-template indirection (typically${property("axonFrameworkVersion")}read from anextra["axonFrameworkVersion"]declaration).Migrates the method signatures ofMessageHandlerInterceptorandMessageDispatchInterceptorimplementations to their Axon Framework 5 shape, while leaving the method body untouched.Rewrites single-argumentSequencingPolicylambdas to the AF5 two-argument shape with anOptionalreturn.Migrates the AF4 Spring Boot snapshotting configuration to the AF5@Snapshottingannotation.Cross-file accumulator populated during the scan phase.Metadata collected for a single@Bean SnapshotTriggerDefinitionmethod.Classification of a scannedSnapshotTriggerDefinitionbean.Strips generic type arguments from references to a specific fully-qualified type.Replaces calls toAggregateLifecycle.apply(...)with calls toeventAppender.append(...)on an injectedEventAppenderparameter, matching the AF5 entity migration pattern documented atdocs/reference-guide/.../paths/aggregates/index.adoc.Bumps the Java compiler target to a configurable LTS, with validation that the target satisfies the Axon Framework 5 minimum (Java 21).Bumps Kotlin to a configurable 2.x line, with validation that the target satisfies the Axon Framework 5 minimum (Kotlin 2.0).