接口 TransactionCallback<T>

  • 类型参数:
    T - the result type
    函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

    @FunctionalInterface
    public interface TransactionCallback<T>
    Callback interface for reactive transactional code. Used with TransactionalOperator's execute method, often as anonymous class within a method implementation.

    Typically used to assemble various calls to transaction-unaware data access services into a higher-level service method with transaction demarcation. As an alternative, consider the use of declarative transaction demarcation (e.g. through Spring's Transactional annotation).

    从以下版本开始:
    5.2
    作者:
    Mark Paluch, Juergen Hoeller
    另请参阅:
    TransactionalOperator