Spring AOP advice order
Posted
by
Chetter Hummin
on Programmers
See other posts from Programmers
or by Chetter Hummin
Published on 2012-09-13T05:46:04Z
Indexed on
2012/09/13
15:50 UTC
Read the original article
Hit count: 242
In Spring AOP, I can add an aspect at the following locations
- before a method executes (using MethodBeforeAdvice)
- after a method executes (using AfterReturningAdvice)
- around a method (both before and after a method executes) (using MethodInterceptor)
If I have all three types of advice, is the order of execution always as follows?
- Around (before part)
- Before
- Method itself
- After
- Around (after part)
© Programmers or respective owner