- Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
The Spring Boot implementations does not set any TaskExecutor
so it defaults to SyncTaskExecutor
. And there is no way (as I know) to override the default jobLauncher
bean because of this line in BasicBatchConfigurer
which creates a default jobLauncher
:
@PostConstruct public void initialize() { try { this.transactionManager = createTransactionManager(); this.jobRepository = createJobRepository(); this.jobLauncher = createJobLauncher(); this.jobExplorer = createJobExplorer(); } catch (Exception ex) { throw new IllegalStateException("Unable to initialize Spring Batch", ex); } }
I also tried to autowire jobLauncher
and set the TaskExecutor
by myself. But because I can only autowire the interface, I can't call jobLauncher.setTaskExecutor(simpleAsyncTaskExecutor)
.
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue