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
  • Aspect
  • Join Point
  • Advice - Before, After, After Returning, After Throwing, Around
  • Pointcut
  • Introduction
  • Weaving
Configuration
  • XML-based Configuration
  • Annotation-based Configuration
Proxies
  • Spring AOP uses proxies to implement aspects.
  • JDK Dynamic Proxies: Used if the target object implements at least one interface.
  • CGLIB Proxies: Used if the target object does not implement any interfaces.
Common annotations
  • @Aspect: Marks a class as an aspect.
  • @Before: Marks a method as a before advice.
  • @After: Marks a method as an after advice.
  • @AfterReturning: Marks a method as an after returning advice.
  • @AfterThrowing: Marks a method as an after throwing advice.
  • @Around: Marks a method as an around advice.
  • @Pointcut: Declares a reusable pointcut expression.
  • @DeclareParents: Used for introduction, allowing an aspect to declare that a type implements a new interface.
  • @EnableAspectJAutoProxy: Enables support for handling components marked with AspectJ's @Aspect annotation. It can be added to a Java configuration class.
Declarative vs Programmatic AOP
  • Declarative AOP: Configuring aspects using XML or annotations.
  • Programmatic AOP: Manually creating proxies and applying aspects in code.
Load-Time Weaving (LTW):
  • Enables aspects to be woven into classes during class loading rather than at compile time or runtime.
  • Useful for scenarios where runtime proxies are not sufficient.
Which of the following can be considered a cross-cutting concern?
Business logic
Authentication*
Data validation
Feature toggles

No comments:

Post a Comment

Most views on this month