How to define / set priority for several aspects using Spring AOP (or AspectJ)

I managed to identify several aspects (one of them @Before and the other @Around) using Spring AOP (combined with AspectJ annotations) over the business services class.

Currently, they are called one after another (sequentially). However, I would like to know how you can prioritize the invocation of aspects and where.

Please consult with regard to Spring AOP. Please note that I am using the Spring 2.5.3 framework.

+5
source share
1 answer

I found the answer to this problem.

@Order, / Aspect (, @Aspect).

org.springframework.core.Ordered Spring framework.

+5

All Articles