在spring组件中,我有这种方法:
@Async("@taskExecutorFactory.getOrCreate(#taskId)")
public void updateTask(String taskId) {
// update code
}
我想为每个调用使用不同的执行器。由TaskExecutorFactory
bean根据taskId
提供执行程序。
Spring无法在启动时识别表达式@taskExecutorFactory.getOrCreate(#taskId)
,并显示以下错误:
A component required a bean named '@taskExecutorFactory.getOrCreate(#chainTaskId)'
that could not be found.
有什么可能的想法吗?