SPR-6644 The 'id' value from an 'executor' element in the task namespace is now used as the thread name prefix for the resulting ThreadPoolTaskExecutor instance.
This commit is contained in:
@@ -108,6 +108,9 @@ public class TaskExecutorFactoryBean implements FactoryBean<TaskExecutor>, BeanN
|
||||
this.setValueIfNotNull("corePoolSize", range[0]);
|
||||
this.setValueIfNotNull("maxPoolSize", range[1]);
|
||||
}
|
||||
if (this.beanName != null) {
|
||||
this.beanWrapper.setPropertyValue("threadNamePrefix", this.beanName + "-");
|
||||
}
|
||||
this.target = (TaskExecutor) this.beanWrapper.getWrappedInstance();
|
||||
if (this.target instanceof InitializingBean) {
|
||||
((InitializingBean)this.target).afterPropertiesSet();
|
||||
|
||||
Reference in New Issue
Block a user