Spring事务失效常见场景_事务失效场景_奇怪的大象的博客-CSDN博客
该文中,通过 AopContext.currentProxy())调用,需加依赖
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
且需
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@EnableAspectJAutoProxy(exposeProxy = true)
public class MainApplication {}
仅用于个人记录