Parent article spring aop aspect configuration_aop aspect setting.**_Personal scum record is only a blog for self-search-CSDN Blog
@annotation
The @annotation method means: the entry point is to specify the annotation that acts on the method, that is, the annotation will be executed when the annotation is scanned by Spring.
@Pointcut(value = "@annotation(com.tiangang.aop.MethodLog)")
public void pointCut() {
}
1
2
3
4
In Spring, there are three implementations of AOP:
Spring 1.2 interface-based configuration: Spring's earliest AOP implementation was completely interface-based. Although compatible, it is not recommended.
Spring 2.0+ schema-based configuration: After Spring 2.0, schema-based configuration is provided, that is, xml configuration.
Spring2.0+ @Aspect configuration: After Spring2.0, @Aspect annotation-based implementation is also provided, which is the protagonist of this article, and it is also the most convenient and widely used method at present! (recommend)
—————————————