springboot aop里的@Pointcut的配置方式-springboot aop里的@Pointcut的配置
最编程
2024-02-10 15:11:40
...
@Pointcut("execution(public * com.wangzhou.newboot.exception.TestExceptionController.test(String,String))")
com.wangzhou.newboot.exception是TestExceptionController类的全路径,test(String,String)是TestExceptionController类下的
test(String s,String d)方法
如果要忽略test方法的入参,所有test方法将被aop
@Pointcut("execution(public * com.wangzhou.newboot.exception.TestExceptionController.test(..))")
如果忽略TestExceptionController的方法,所有TestExceptionController下的方法将被aop
@Pointcut("execution(public * com.wangzhou.newboot.exception.TestExceptionController.*(..))")
如果忽略exception路径下的所有类,不包括exception的子路径
@Pointcut("execution(public * com.wangzhou.newboot.exception.*.*(..))")
如果忽略newboot路径下的所有类,不包括newboot的子路径比如exception里的类,
@Pointcut("execution(public * com.wangzhou.newboot..*.*(..))")
上一篇: 如何实际操作Java的jmap命令
下一篇: 简易理解的jmap内存分析工具指南
推荐阅读
-
标题:一文搞定Redis面试,附Redis面试大纲+常见Redis面试题-一、基础篇 快速上手 ①. 什么是redis ②. 为什么使用redis ③. 安装 ④. 基本使用(常见数据结构的命令) Java操作redis ①. Jedis ②. SpringBoot 启动redis的方式 ①. 配置文件 ②. 生产环境启动方案 二、进阶篇 redis实现session共享 redis缓存的使用 ①. 注解式 ②. Spring Cache 数据库和缓存双写一致性问题——穿透 redis实现附近的人 redis实现计数器 redis事务 redis分布式锁的使用 redis集群 redis实现延时队列 redis实现限流 redis实现布隆过滤器 发布订阅 redis优化 三、原理篇 redis单线程为什么性能好 数据类型的底层实现 持久化机制 过期策略 内存淘汰 redis优化 哨兵模
-
springboot aop里的@Pointcut的配置方式-springboot aop里的@Pointcut的配置