Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 Spring AOP 中的所有类都有一个切入点,比如
@Pointcut("执行(* com.company.app..*(..))")
现在我需要排除一个类,比如 com.company.app.IgnoreClass。有人可以帮我写切入点吗?
排除所有方法的切入点IgnoreClass是:
IgnoreClass
@Pointcut("execution(* com.company.app..*(..)) && !execution(* com.company.app.IgnoreClass.*(..)) ")
关于切入点表达式的文档在这里,还有更多关于 Spring AOP在这里声明切入点的相关信息。