1

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)
  • What? 15 char.. – David Cowden Sep 13 '12 at 8:35
  • You'd do better searching for an answer to this on Stack Overflow; that's the place for programming questions with a simple, correct answer. – Donal Fellows Sep 13 '12 at 8:51
  • @Donal Fellows My bad. I thought this would be more theoretical than is allowed in Stack Overflow – Chetter Hummin Sep 13 '12 at 9:41
  • Please go through the link. To understand the ordering of Spring AOP advices: ordering of Spring AOP advices – user72945 Nov 18 '12 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.