Spring AOP
Java · 8 notes
- Usagehistorical
Examples such as HelloWorld demonstrate Spring AOP usage and the relationship between aspect configuration and target-method calls.
- What Spring AOP Ishistorical
AOP adds cross-cutting behavior without directly changing business code. These notes use logging to explain separating aspects from business logic.
- 1. Inject AspectJAnnotationAutoProxyCreator into the Containerhistorical
Enabling @EnableAspectJAutoProxy imports AOP components into Spring. These notes trace automatic proxy creator registration from the annotation's source.
- 2.1 How the AnnotationAwareAspectJAutoProxyCreator Bean Instance Is Createdhistorical
AnnotationAwareAspectJAutoProxyCreator is both a bean post-processor and BeanFactoryAware. These notes use breakpoints to examine its creation and initialization.
- Spring AOP Source Analysis Summaryhistorical
Spring AOP's automatic proxy creator participates in bean initialization and generates proxies at the relevant stage. This page summarizes related interfaces and call relationships.
- 2.2 When Does AnnotationAwareAspectJAutoProxyCreator Take Effect?historical
Breakpoints around bean initialization show when AnnotationAwareAspectJAutoProxyCreator participates in the bean lifecycle.
- 2.3 How AnnotationAwareAspectJAutoProxyCreator Creates Proxy Objectshistorical
These notes follow target-bean creation through the automatic proxy creator to examine aspect checks and proxy generation.
- 2.4 How the Target Method Is Executedhistorical
Calls to a proxied target enter an interceptor. These notes trace the interceptor chain and target execution from CglibAopProxy.intercept.