Giter Site home page Giter Site logo

spring-transaction's Introduction

接口: http://localhost:8080/test/{type} 下面为type的取值代表的意义:
0:正常插入。
1:测试传播特性 Required:如果当前已经存在事务,那么加入该事务,如果不存在事务,创建一个事务,这是默认值。
2:测试传播特性 RequiresNew:开启新事物,如果当前已存在事务,将当前事务挂起,新事物不影响旧事物的回滚。
3:测试传播特性 Mandatory:当前必须存在事务,否则抛出异常。
4:测试传播特性 Supports:如果当前已经存在事务,那么加入该事务,如果不存在事务,以非事务方式进行。
5:测试传播特性 Nested:嵌套事务,内部事务的回滚会影响外部事务回滚。
6:测试传播特性 Never:以非事务方式进行,如果存在事务则抛异常。
7:测试传播特性 NotSupported:以非事务方式进行,如果当前存在事务,挂起当前事务。
8:测试private或protected修饰的方法,即使加了@Transactional注解,事务也不会回滚。
9:测试一个类的内部方法之间的调用,调用姿势不对时,即使加了@Transactional注解,事务也不会回滚。
10:测试需要回滚的异常和抛出的异常不匹配的场景,即使加了@Transactional注解,事务也不会回滚。
11:测试异常被捕捉的场景,异常被捕捉后,即使加了@Transactional注解,事务也不会回滚。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.