【spring】 标签 expression属性

execution()是方法描述的匹配

任意公共方法的执行: 
    execution(public * *(..)) 
任何一个以“set”开始的方法的执行: 
    execution(* set*(..)) AccountService 
接口的任意方法的执行: 
    execution(* com.xyz.service.AccountService.*(..)) 
定义在service包里的任意方法的执行: 
    execution(* com.xyz.service.*.*(..)) 
定义在service包和所有子包里的任意类的任意方法的执行: 
    execution(* com.xyz.service..*.*(..)) 
定义在pointcutexp包和所有子包里的JoinPointObjP2类的任意方法的执行: 
    execution(* com.test.spring.aop.pointcutexp..JoinPointObjP2.*(..))") ***> 
    最靠近(..)的为方法名,靠近.*(..))的为类名或者接口名,如上例的JoinPointObjP2.*(..))

猜你喜欢

转载自blog.csdn.net/sun337939896/article/details/79096659
今日推荐