1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Update Spring事务总结.md

This commit is contained in:
guide 2020-12-26 14:01:47 +08:00
parent 730dee4cd2
commit 96510f4704

View File

@ -60,7 +60,7 @@ public class OrdersService {
- **隔离性Isolation** 数据库允许多个并发事务同时对其数据进行读写和修改的能力隔离性可以防止多个事务并发执行时由于交叉执行而导致数据的不一致。事务隔离分为不同级别包括未提交读Read uncommitted、提交读read committed、可重复读repeatable read和串行化Serializable
- **持久性Durability:** 事务处理结束后,对数据的修改就是永久的,即便系统故障也不会丢失。
[参考]https://zh.wikipedia.org/wiki/ACID
参考 [https://zh.wikipedia.org/wiki/ACID](https://zh.wikipedia.org/wiki/ACID) 。
## 3. 详谈 Spring 对事务的支持
@ -393,7 +393,7 @@ Class B {
这里还是简单举个例子:
如果 `aMethod()` 回滚的话,`bMethod()``bMethod2()`都要回滚,而`bMethod()`回滚的话,并不会造成 `aMethod()``bMethod()`回滚。
如果 `aMethod()` 回滚的话,`bMethod()``bMethod2()`都要回滚,而`bMethod()`回滚的话,并不会造成 `aMethod()``bMethod()2`回滚。
```java
Class A {