22 October 2020

#Spring-AOP

Spring AOP
What are the different implementations of Spring AOP ?
What is AspectJ?
What is Spring AOP?
What is JBoss AOP?
What is Joinpoint?
What is Advice? Types?
What is Aspect?
What is Before advice?
What is After returning advice?
What is After throwing advice?
What is After advice?
What is Around advice ?
What is Run-time AOP?
What is Compile-time AOP?
What is Source code weaving?
What is Compile-time weaving?
What is Binary weaving?
What is Load-time weaving (LTW)?
What is Proxy-based LTW?
What is a cross-cutting concern? Can you name three typical cross-cutting concerns?
What are the problems arise if you don’t solve a cross-cutting concern via AOP?
What is a pointcut, a join point, advice, an aspect, weaving?
What are the two proxy-types used in Spring AOP?
What is JDK dynamic proxy?
What is CGLIB proxy?
What are the limitations of the two proxy-types used in Spring AOP?
What visibility must Spring bean methods have to be proxied using Spring AOP?
What is a ProceedingJoinPoint? Which advice type is it used with?
What is Introduction?
What is Target Object?
What are the differences between OOP and AOP ?
What is AOP Alliance
Which problem AOP solves?
Which types of advice you can use to try and catch exceptions?
How does Spring solve (implement) a cross-cutting concern?
How to enable @AspectJ Support?
Difference Run-time AOP vs Compile-time AOP ?
What is the difference between concern and cross-cutting concern in Spring AOP?
What are the available AOP implementations?
What are the different advice types in spring?
What is Spring AOP Proxy?
What is Introduction?
What is joint point and Point cut?
What is Weaving in AOP?
What is Spring AOP?

  • Spring AOP
    • There is a need for a separate compilation process.
    • It supports only method execution pointcuts.
    • It can be implemented on beans managed by Spring Container.
    • It supports only method level weaving.

  • Aspect - A code unit that encapsulates pointcuts, advices, and attributes.
  • PointCut - It defines the set of entry points in which advice is executed.
  • Weaving - It constructs code (source or object) with advice.
  • JDK & CGLib proxy
  • Introduction - It allows you to add new methods or attributes to existing classes.
  • Advice - It is an implementation of cross-cutting concerns.

    • Before Advice: An advice that executes before a join point, is called before advice. We use @Before annotation to mark an advice as Before advice.
    • After Advice: An advice that executes after a join point, is called after advice. We use @After annotation to mark an advice as After advice.
    • Around Advice: An advice that executes before and after of a join point, is called around advice.
    • After Throwing Advice: An advice that executes when a join point throws an exception.
    • After Returning Advice: An advice that executes when a method executes successfully.

  • Cross cutting concern - It is a concern that we want to implement in multiple places in an application. It affects the entire application.
  • Join point - This represents a point in your application where you can plug-in AOP aspect. It is the actual place in the application where an action will be taken using Spring AOP framework.
  • Target object - The object being advised by one or more aspects. This object will always be a proxied object. Also referred to as the advised object.
  • AOP Alliance

Difference

  • Spring AOP and aspectJ
  • Concern and cross-cutting concern

No comments:

Post a Comment

Most views on this month