Class FlagSerializerBeans
- All Implemented Interfaces:
Cloneable
@Bean methods that register an Axon Framework 4 Serializer with a
// TODO(axon4to5): comment.
AF5 replaced the Serializer API with the Converter API, so such a bean no longer compiles. A
Serializer cannot be swapped for a Converter mechanically (for example, XStreamSerializer has
no replacement), hence the comment points to the serializer migration path instead of rewriting the bean.
A method is flagged when it is annotated with @Bean and its declared return type is assignable to the AF4
org.axonframework.serialization.Serializer or to the same type after the package rename to
org.axonframework.conversion. The latter keeps the recipe working regardless of whether it runs before or
after the package rename. Serializers of other libraries, such as Jackson's JsonSerializer or Kafka's
Serializer, are never flagged. Only when the return type could not be resolved at all does the recipe fall
back to the simple name Serializer.
- Since:
- 5.5.0
- Author:
- Steven van Beelen
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.Recipe
addDataTable, aggregateDataTableDescriptors, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll, withOptions
-
Constructor Details
-
FlagSerializerBeans
public FlagSerializerBeans()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()- Overrides:
getVisitorin classorg.openrewrite.Recipe
-