Reputation: 4102
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.
Upvotes: 7
Views: 5349
Reputation: 4102
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.
Upvotes: 9