Closed Puppy4C closed 2 weeks ago
This PR provides the ability to use @Order sorting for Advice Annotation.
@Order
Example:
@Aspect public class MyAspect { @Order(1) @Before("execution(* org.example.AopObj.*(..))") public void method1() { System.out.println("Before method-1"); } @Order(2) @Before("execution(* org.example.AopObj.*(..))") public void method2() { System.out.println("Before method-2"); } }
method1() will be executed before method2() because the sequence number of method1() is smaller.
method1()
method2()
Thanks for the PR. This was declined in #29732 and #32570 already.
This PR provides the ability to use
@Order
sorting for Advice Annotation.Example:
method1()
will be executed beforemethod2()
because the sequence number ofmethod1()
is smaller.