I have been able to define multiple aspects (one is @Before and another is @Around) using Spring AOP (combined with AspectJ annotations) over a business service class.
Currently they are getting called one by one (in sequence). However I would like to know how the priority of calling the aspects can be defined and where.
Please guide me with respect to Spring AOP. Please note that I am using Spring 2.5.3 framework.
I found the answer to this problem.
One can use @Order annotation to specify the order / sequence for particular Aspect class (the class annotated with @Aspect).
Or the aspect class can implement org.springframework.core.Ordered interface to provide order value to Spring framework.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With