Skip to content

Commit cb33610

Browse files
committed
更新spring事务:添加管理事务的方式、事务传播方式思维导图
1 parent c6d832c commit cb33610

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/system-design/framework/spring/SpringInterviewQuestions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ MVC 是一种设计模式,Spring MVC 是一款很优秀的 MVC 框架。Spring M
258258
1. 基于XML的声明式事务
259259
2. 基于注解的声明式事务
260260

261+
**思维导图**
262+
263+
![image-20210807101442105](https://gitee.com/yamonc/blogImage/raw/master//img/blogImage/image-20210807101442105.png)
264+
261265
### 8.2 Spring 事务中的隔离级别有哪几种?
262266

263267
**TransactionDefinition 接口中定义了五个表示隔离级别的常量:**
@@ -286,6 +290,10 @@ MVC 是一种设计模式,Spring MVC 是一款很优秀的 MVC 框架。Spring M
286290

287291
- **TransactionDefinition.PROPAGATION_NESTED:** 如果当前存在事务,则创建一个事务作为当前事务的嵌套事务来运行;如果当前没有事务,则该取值等价于TransactionDefinition.PROPAGATION_REQUIRED。
288292

293+
**思维导图:**
294+
295+
![image-20210807102320870](https://gitee.com/yamonc/blogImage/raw/master//img/blogImage/image-20210807102320870.png)
296+
289297
### 8.4 @Transactional(rollbackFor = Exception.class)注解了解吗?
290298

291299
我们知道:Exception分为运行时异常RuntimeException和非运行时异常。事务管理对于企业应用来说是至关重要的,即使出现异常情况,它也可以保证数据的一致性。

0 commit comments

Comments
 (0)