Class AnnotateObsoleteSequencingPolicyProperty

java.lang.Object
org.openrewrite.Recipe
org.axonframework.migration.AnnotateObsoleteSequencingPolicyProperty
All Implemented Interfaces:
Cloneable

public class AnnotateObsoleteSequencingPolicyProperty extends org.openrewrite.Recipe
Spring-Boot-only advisory recipe for the AF4 → AF5 sequencing-policy migration.

In AF4, sequencing for an event-processing group was configured via the Spring property axon.eventhandling.processors.<group>.sequencing-policy. AF5 moves that decision onto the event handler class itself, via @SequencingPolicy(...) from org.axonframework.messaging.core.annotation. The property therefore becomes obsolete — but the per-construct migration skill drives the source-side annotation move, so deleting the property mechanically here would race the skill (and risk silently dropping configuration before the handler class catches up).

Instead, this recipe inserts an advisory comment immediately above any matching property entry in application.properties / application.yml (including profile-specific files via the standard recipe-tooling glob). The comment surfaces the obsolescence to the developer (and to the LLM-driven skill that runs next) without touching the value. The recipe is idempotent — it skips entries whose preceding comment already carries the marker.

Since:
5.1.1
Author:
Mateusz Nowak
  • 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>
     

    Methods inherited from class org.openrewrite.Recipe

    addDataTable, 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

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AnnotateObsoleteSequencingPolicyProperty

      public AnnotateObsoleteSequencingPolicyProperty()
  • Method Details

    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in class org.openrewrite.Recipe
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.openrewrite.Recipe
    • getVisitor

      public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
      Overrides:
      getVisitor in class org.openrewrite.Recipe