Open odrotbohm opened 4 months ago
Will it be possible to configure the Executor
or extend its functionality? Our application configures a custom TaskDecorator
. Currently, we use a custom aspect to get the same functionality for @ApplicationModuleListener
.
Yes, you'll be able to override the bean by name. Or use a BeanPostProcessor
to find and customize it.
@ApplicationModuleListener
s need dedicated control over theExecutor
running them, for example, to enable tracing context propagation in the observability module. To contain the impact of such a customization, it makes sense to use a dedicatedExecutor
.Implementation considerations
ThreadPoolTaskExecutor
/SimpleAsyncTaskExecutor
with a dedicated name and refer to that from the@Async
annotation on@ApplicationModuleListener
(@ConditionalOnThreading
,@ConditionalOnMissingBean
)References