Spring aop中模式符号
来源:互联网 发布:保卫萝卜网页源码 编辑:程序博客网 时间:2024/06/16 17:52
如:
<aop:config>
<aop:pointcut
expression="execution(* com.lenovo.*.*(..)) ||
execution(public * com.lenovo.lps.farseer.avatar.purview.impl.ProductServiceImpl.*(..))"
id="ServiceOpertation" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="ServiceOpertation" />
</aop:config>
execution(modifiers-pattern? ret-type-pattern declaring-type-pattern? name-pattern(param-pattern) throws-pattern?)
其中带问号的modifiers-pattern?(public/protected) 和 declaring-type-pattern? throws-pattern? 可以不填
execution(* *..BookManager.save(..))的解读:
第一颗* 代表ret-type-pattern 返回值可任意,
*..BookManager 代表任意Pacakge里的BookManager类。
如果写成com.xyz.service.* 则代表com.xyz.service下的任意类
如果写成com.xyz.service.*.* 则代表com.xyz.service下的任意类的任意方法
com.xyz.service..* com.xyz.service则代表com.xyz.service及其子package下的任意类
save代表save方法,也可以写save* 代表saveBook()等方法
(..) 匹配0个参数或者多个参数的,任意类型
(x,..) 第一个参数的类型必须是X
(x,,,s,..) 匹配至少4个参数,第一个参数必须是x类型,第二个和第三个参数可以任意,第四个必须是s类型
- Spring aop中模式符号
- Spring中AOP的代理模式
- Spring---Spring中AOP
- spring事务管理,AOP模式
- spring aop 适配器模式
- Spring AOP代理模式
- Spring AOP 代理模式
- Spring中AOP简介
- 实战Spring中AOP
- spring中得AOP
- Spring中AOP介绍
- spring中 aop注解
- Spring中AOP实现
- Spring中使用Aop
- spring中aop配置
- Spring中AOP
- Spring中AOP注解
- spring中AOP编程
- 切换观感
- 【LeetCode】Merge k Sorted Lists
- 解决ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server 方法
- js实现汉字转拼音
- linux shell trap功能介绍
- Spring aop中模式符号
- javascript创建对象
- nginx https_ssl ssl证书生成及注册全过程
- 解决ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
- 是否仍沉浸于Linux下的top、ps、pstree的美好?
- QT Demo 之 window(5) window.qml
- LNMP 配置漏洞系列解读
- 栈的链式结构表示与实现——自己写数据结构
- 自定义可扩性很强的Dialog