初始化
事物
- 参考:https://www.cnblogs.com/dennyzhangdd/p/9602673.html
- PlatformTransactionManager 接口
- TransactionStatus getTransaction(@Nullable TransactionDefinition definition) throws TransactionException;
- void commit(TransactionStatus status) throws TransactionException;
- void rollback(TransactionStatus status) throws TransactionException;
TransactionAspectSupport
- TransactionInterceptor
1 | // 存在事物调用时才会进入此拦截器 |
- TransactionAspectSupport.java
1 | protected Object invokeWithinTransaction(Method method, Class<?> targetClass, final InvocationCallback invocation) |
AbstractPlatformTransactionManager
1 | // 如有必要则创建事物对象(不存在事物对象TransactionStatus时) |