Patch Naming Convention

Understanding the naming convention is key to figuring out the order patches are applied in.

To enable the system to sort patches in an alphabetical order, use the following property with the value true:

system.setup.sort.legacy.mode=true

Patches are sorted by name within an extension and applied in that order. To give a patch a name, use the name flag. If you don't provide a name, the system automatically applies one using both the Spring Bean ID of a class and the name of a method.

In this example the foo method has foo as a value for the name parameter. The bar method doesn't have an explicitly provided name:
@SystemSetup(extension = "sampleExtension")
public class XmlDefinitionUpdater
{
    @SystemSetup(name = "foo", patch = true)
    public void foo()
    {
    //...
    }
 
    @SystemSetup(patch = true)
    public void bar()
    {
    //...
    }
}
In this case the name for the bar method is auto-generated. Assuming that a Spring Bean ID of the class is xmlDefinitionUpdater, the name of the patch will be xmlDefinitionUpdater#bar.