Spring----自定义异常类

自定义的异常类要继承RunTimeException

Spring框架只对抛出的异常是RunTimeException才会进行事务回滚,如果是Exception就不会进行事务回滚

原文地址:https://www.cnblogs.com/elian91/p/11228772.html