【文件属性】:
文件名称:test-transactional:关于spring中@Transactional注解传播属性原理的实验
文件大小:18KB
文件格式:ZIP
更新时间:2021-04-27 18:50:23
spring transactional Java
test-transactional
关于spring中@Transactional注解传播属性原理的实验
具体方法:
主体形式:a方法调用b方法
a插入数据“one”
b插入数据“two”
a、b方法都可以有不同的传播级别或者不加事务注解(none):
required(rd), required_new(rn), never(nr), supports(ss), not_supoort(ns), mandatory(mt), nested(ne)
a和b方法都可能抛异常,对于b方法抛出的异常,a方法可以选择捕获或向上抛出
控制变量:
a传播级别(father)
b传播级别(son)
a是否抛出异常(fatherthrow)
b是否抛出异常(sonthrow)
b抛出异常时,a是否catch它(fathercatch)
对于以上所有的情况进行枚举,得出以下实验现象:
是否调用了a(can
【文件预览】:
test-transactional-master
----README.md(17KB)
----pom.xml(2KB)
----mvnw(6KB)
----result.csv(15KB)
----src()
--------test()
--------main()
----mvnw.cmd(5KB)