Aspect 切点表达式(xml形式,非注解形式的)
<aop:pointcut expression="切点表达式" id="aspect"/> Aspect 切点表达式: execution: 匹配指定的方法 execution(void perform()) 匹配项目下所有该方法 execution(void first.Singer.perform()) 匹配具体到某个类的该方法 execution(* first.Artist.perform()) 不考虑返回值类型 execution(* first.Artist.perform(..)) 不考虑返回值类型和参数列表 execution(* first.Aritst.perform(*,*)) 参数必须是两个 execution(* first.Artist.perform(..,java.lang.String)) execution(* find*(..)) 所有方法名符合findXxx 的方法 execution(* com.tarena.service.StoreService.*(..)) 该类中所有方法 execution(* com.tarena.service.*.*(..)) 该包中所有类的所有方法 execution(* com.tarena..*.*(..)) 该包及其子包中所有类的所有方法 within: 匹配类内的所有方法(必须是实现类,不能是接口)
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |