1.

Mention And Explain The Types Of Advice In Spring?

Answer»

Types of advice are:

  • Before advice: Advice that is EXECUTED prior to a joinpoint is called the ‘before advice’.
  • After returning advice: Advice that is executed after the NORMAL completion of a joinpoint is called the ‘after returning advice’.
  • After throwing advice: Advice that is executed only if a method exits ABNORMALLY by throwing an EXCEPTION, is called the ‘after throwing advice’.
  • After (finally) advice: Advice that is executed irrespective of how a joinpoint exits is called ‘after finally advice’.
  • Around advice: Advice that borders a joinpoint, for example, a method invocation, is called an ‘around advice’. This can be used to perform special ACTIVITIES before and after the invocation of method.

Types of advice are:



Discussion

No Comment Found