Get the App
SLTechnology News&Howtos  ›  Servers  › 

What is the common transaction configuration of spring

Shulou Source: shulou.com Published: 2022-05-31 22:45:54 10月01日 Update

What is the common transaction configuration of spring? in view of this question, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

PROPAGATION_REQUIRED-- supports the current transaction, and if there is no transaction, create a new transaction. This is the most common choice.

PROPAGATION_SUPPORTS-- supports the current transaction, and if there is no transaction, it is executed in a non-transactional manner.

PROPAGATION_MANDATORY-- supports the current transaction and throws an exception if there is no current transaction.

PROPAGATION_REQUIRES_NEW-- creates a new transaction and suspends the current transaction if it exists.

PROPAGATION_NOT_SUPPORTED-- performs operations in a non-transactional manner, suspending the current transaction if there is a current transaction.

The PROPAGATION_NEVER-- executes in a non-transactional manner and throws an exception if a transaction currently exists.

PROPAGATION_NESTED-- if a transaction currently exists, it is executed within a nested transaction. If there is no transaction currently, do something similar to PROPAGATION_REQUIRED.

This is the answer to the question about what is the common transaction configuration of spring. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Tags: Transactions methods questions support common use configuration more help answers easy easy content guys partners common methods knowledge articles industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL macOS Shulou Tech Info Microsoft Apple