类 SyncTaskExecutor

  • 所有已实现的接口:
    Serializable, Executor, TaskExecutor

    public class SyncTaskExecutor
    extends Object
    implements TaskExecutor, Serializable
    TaskExecutor implementation that executes each task synchronously in the calling thread.

    Mainly intended for testing scenarios.

    Execution in the calling thread does have the advantage of participating in it's thread context, for example the thread context class loader or the thread's current transaction association. That said, in many cases, asynchronous execution will be preferable: choose an asynchronous TaskExecutor instead for such scenarios.

    从以下版本开始:
    2.0
    作者:
    Juergen Hoeller
    另请参阅:
    SimpleAsyncTaskExecutor, 序列化表格