申明

spring aop 申明了切面类之后,如何申明切入点呢?

混江龙づ霸主 提交于 2019-12-04 09:09:28
8.2.3 Declaring a pointcut Recall that pointcuts determine join points of interest, and thus enable us to control when advice executes. Spring AOP only supports method execution join points for Spring beans , so you can think of a pointcut as matching the execution of methods on Spring beans. A pointcut declaration has two parts: a signature comprising a name and any parameters, and a pointcut expression that determines exactly which method executions we are interested in. Spring AOP 仅仅支持Bean里面的方法切入点,所以切入点主要作用就是申明 匹配 Bean里面的方法。Pointcut 申明有两个部分哦,一个是签名方法 包含有方法名字和参数。另外一个是切入点表达式,这个是用来申明在哪些方法上面执行切入