web123456

7 transaction configurations of propagation in Spring

 REQUIRED: Supports the current transaction. If there is no transaction at present, create a new transaction. This is the most common choice.

 SUPPORTS: Supports the current transaction. If there is no transaction at present, it will be executed in a non-transactional manner.

 MANDATORY: Supports the current transaction. If there is no transaction at present, an exception will be thrown.

 REQUIRES_NEW: Create a new transaction. If the transaction currently exists, suspend the current transaction.

 NOT_SUPPORTED: Execute operations in a non-transactional manner. If a transaction currently exists, the current transaction will be suspended.

 NEVER: Execute in a non-transactional manner, and throws an exception if a transaction currently exists.

 NESTED: Supports the current transaction. If the current transaction exists, a nested transaction is executed. If there is no transaction at present, a new transaction is created.