背景:今天在debug到某个方法时,接下来step into,发现没有进入到方法的实现类代码,而是进入到了DynamicAdvisedInterceptor#intercept class方法
后来想了想,是因为test这个方法使用了事务注解,spring事务注解的原理就是aop代理,因此原因知道了,那么怎么解决呢?
The OP suggested that they had already done this, but here's how you can disable stepping into specified classes (IntelliJ ULTIMATE 2018.2):
File -> Settings... -> Build, Execution, Deployment -> Debugger -> Stepping
... Do not step into the classes -> Add Pattern -> Enter the filter pattern:
... ... org.springframework.aop.*
Notice that you can use wildcards to disable entire namespaces -- so for example, assuming that your organization's namespace starts with com, you can get most of the way there by blacklisting org.*.
增加一个org.springframework.aop.* 模式即可跳过aop的源码
再增加一个org.springframework.transaction.*模式跳过事务的源码