删除AsyncListenableTaskExecutor配置,官方commit(38727db7926ea470ae81eee6c95123123a3035cc)已经“Replace the use of the deprecated AsyncListenableTaskExecutor with AsyncTaskExecutor”,且ProcessEngineAutoConfiguration会注入
parent
edb74f64d9
commit
9ef140f07f
|
|
@ -15,8 +15,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.task.AsyncListenableTaskExecutor;
|
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -28,25 +26,6 @@ import java.util.List;
|
||||||
@Configuration(proxyBeanMethods = false)
|
@Configuration(proxyBeanMethods = false)
|
||||||
public class BpmFlowableConfiguration {
|
public class BpmFlowableConfiguration {
|
||||||
|
|
||||||
/**
|
|
||||||
* 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean
|
|
||||||
*
|
|
||||||
* 如果不创建,会导致项目启动时,Flowable 报错的问题
|
|
||||||
*/
|
|
||||||
@Bean(name = "applicationTaskExecutor")
|
|
||||||
@ConditionalOnMissingBean(name = "applicationTaskExecutor")
|
|
||||||
public AsyncListenableTaskExecutor taskExecutor() {
|
|
||||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
||||||
executor.setCorePoolSize(8);
|
|
||||||
executor.setMaxPoolSize(8);
|
|
||||||
executor.setQueueCapacity(100);
|
|
||||||
executor.setThreadNamePrefix("flowable-task-Executor-");
|
|
||||||
executor.setAwaitTerminationSeconds(30);
|
|
||||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
|
||||||
executor.setAllowCoreThreadTimeOut(true);
|
|
||||||
executor.initialize();
|
|
||||||
return executor;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BPM 模块的 ProcessEngineConfigurationConfigurer 实现类:
|
* BPM 模块的 ProcessEngineConfigurationConfigurer 实现类:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue