Spring AOP 实现方式对比
Spring AOP 默认用 JDK 动态代理还是 CGLIB?为什么 @Transactional 自调用会失效?理解代理机制才能避开这些坑。 一、AOP 的核心概念 1.1 Aspect / JoinPoint / Advice / Pointcut / Weaving 1.2 Spring AOP vs AspectJ 的区别 1.3 Spring AOP 是基于代理的——只能拦截方法 二、JDK 动态代理 2.1 基于接口的代理——必须有接口 2.2 Proxy.newProxyInstance() 原理 2.3 Invocation...