Introduce @BatchTaskExecutor for customizing Batch's task executor

Closes gh-40040
This commit is contained in:
Andy Wilkinson
2024-10-22 10:18:55 +01:00
parent a391613a1a
commit fc091f7bdd
4 changed files with 98 additions and 1 deletions

View File

@@ -29,6 +29,14 @@ If you do so and want two transaction managers, remember to mark the other one a
[[howto.batch.specifying-a-task-executor]]
== Specifying a Batch Task Executor
Similar to xref:batch.adoc#howto.batch.specifying-a-data-source[], you can define a `TaskExecutor` for use in the batch processing by marking it as `@BatchTaskExecutor`.
If you do so and want two task executors, remember to mark the other one as `@Primary`.
[[howto.batch.running-jobs-on-startup]]
== Running Spring Batch Jobs on Startup