SpringBoot AOP切入点表达式

介绍

在AOP中可以通过注解来定义 切入点表达式来控制被监控的方法。

匹配所有 com.example.service 包下以 Service 结尾的方法:

java 复制代码
"execution(* com.example.service.*Service.*(..))"

匹配任意类的 public 方法:

java 复制代码
"execution(public * *(..))"

匹配 com.example.service 包及其子包下的任意方法:

java 复制代码
"execution(* com.example.service..*.*(..))"

匹配 MyService 类中的 doSomething 方法:

java 复制代码
"execution(* com.example.service.MyService.doSomething(..))"

匹配 com.example.service 包中的任何类的 save 方法,且方法参数为 java.lang.String 类型

yaml 复制代码
"execution(* com.example.service.*.save(java.lang.String))"
相关推荐
weixin_419658313 分钟前
UISpy:Windows 界面控件的“显微镜“[特殊字符]
windows·python·测试工具·ui
不如语冰15 分钟前
AI大模型入门1.1-python基础-数据结构
数据结构·人工智能·pytorch·python·cnn
知行合一。。。17 分钟前
Python--04--数据容器(列表 List)
开发语言·python
子非鱼92121 分钟前
MyBatisPlus快速上手
数据库·spring boot·mybatisplus
杰瑞哥哥30 分钟前
【时间序列与深度学习】(一)经济计量基础ARIMA模型
python·时间序列·金融工程
皙然37 分钟前
SpringBoot 自动装配深度解析:从底层原理到自定义 starter 实战(含源码断点调试)
java·spring boot·spring
网安CILLE42 分钟前
Wireshark 抓包实战演示
linux·网络·python·测试工具·web安全·网络安全·wireshark
王夏奇1 小时前
python中的基础知识点-1
开发语言·windows·python
叫我辉哥e11 小时前
新手进阶Python:办公看板集成多数据源+ECharts高级可视化
开发语言·python·echarts
程序员敲代码吗1 小时前
如何从Python初学者进阶为专家?
jvm·数据库·python