Spring Transactions

Propagation properties of Spring transactions

propagation_required: support the current transaction, if there is no current transaction, create a new transaction.

propagation_requires_new: Create a new transaction. If there is a current transaction, suspend the current transaction. The newly created transaction has nothing to do with the suspended transaction, it is two independent transactions.

propagation_supports: supports the current transaction, if there is no current transaction, it will be executed in a non-transactional manner.

propagation_mandatory: support the current transaction, if there is no transaction, an exception will be thrown.

propagation_not_supported: Execute the operation in a non-transactional manner. If there is a current transaction, suspend the current transaction.

propagation_never: executes in a non-transactional manner, throwing an exception if there is a current transaction.

propagation_nested: If an active transaction exists, run in a nested transaction. If there is no active transaction, it is executed according to the required attribute.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325338471&siteId=291194637