Spring AOP异常捕获原理

 

Spring AOP异常捕获原理:
        被拦截的方法,须显式的抛出异常,且不能做任何处理,
 这样AOP才能捕获到方法中的异常,进而进行回滚。
        换句话说,就是在Service层的方法中,不需要使用 try...catch 
  或者在catch中的最后加上 throw new RuntimeException(); 这样程序才会被AOP捕获,进而进行回滚。

原文地址:https://www.cnblogs.com/flywang/p/11399724.html