Commit 0c0a6ae40af5d0d3794f49daa8db3139f6591e0c
1 parent
7ce2a19e
feat:【bpm】删除AsyncListenableTaskExecutor配置
Showing
1 changed file
with
0 additions
and
23 deletions
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/framework/flowable/config/BpmFlowableConfiguration.java
| @@ -11,12 +11,9 @@ import org.flowable.common.engine.api.delegate.event.FlowableEventListener; | @@ -11,12 +11,9 @@ import org.flowable.common.engine.api.delegate.event.FlowableEventListener; | ||
| 11 | import org.flowable.spring.SpringProcessEngineConfiguration; | 11 | import org.flowable.spring.SpringProcessEngineConfiguration; |
| 12 | import org.flowable.spring.boot.EngineConfigurationConfigurer; | 12 | import org.flowable.spring.boot.EngineConfigurationConfigurer; |
| 13 | import org.springframework.beans.factory.ObjectProvider; | 13 | import org.springframework.beans.factory.ObjectProvider; |
| 14 | -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
| 15 | import org.springframework.context.ApplicationEventPublisher; | 14 | import org.springframework.context.ApplicationEventPublisher; |
| 16 | import org.springframework.context.annotation.Bean; | 15 | import org.springframework.context.annotation.Bean; |
| 17 | import org.springframework.context.annotation.Configuration; | 16 | import org.springframework.context.annotation.Configuration; |
| 18 | -import org.springframework.core.task.AsyncListenableTaskExecutor; | ||
| 19 | -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
| 20 | 17 | ||
| 21 | import java.util.List; | 18 | import java.util.List; |
| 22 | 19 | ||
| @@ -29,26 +26,6 @@ import java.util.List; | @@ -29,26 +26,6 @@ import java.util.List; | ||
| 29 | public class BpmFlowableConfiguration { | 26 | public class BpmFlowableConfiguration { |
| 30 | 27 | ||
| 31 | /** | 28 | /** |
| 32 | - * 参考 {@link org.flowable.spring.boot.FlowableJobConfiguration} 类,创建对应的 AsyncListenableTaskExecutor Bean | ||
| 33 | - * | ||
| 34 | - * 如果不创建,会导致项目启动时,Flowable 报错的问题 | ||
| 35 | - */ | ||
| 36 | - @Bean(name = "applicationTaskExecutor") | ||
| 37 | - @ConditionalOnMissingBean(name = "applicationTaskExecutor") | ||
| 38 | - public AsyncListenableTaskExecutor taskExecutor() { | ||
| 39 | - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); | ||
| 40 | - executor.setCorePoolSize(8); | ||
| 41 | - executor.setMaxPoolSize(8); | ||
| 42 | - executor.setQueueCapacity(100); | ||
| 43 | - executor.setThreadNamePrefix("flowable-task-Executor-"); | ||
| 44 | - executor.setAwaitTerminationSeconds(30); | ||
| 45 | - executor.setWaitForTasksToCompleteOnShutdown(true); | ||
| 46 | - executor.setAllowCoreThreadTimeOut(true); | ||
| 47 | - executor.initialize(); | ||
| 48 | - return executor; | ||
| 49 | - } | ||
| 50 | - | ||
| 51 | - /** | ||
| 52 | * BPM 模块的 ProcessEngineConfigurationConfigurer 实现类: | 29 | * BPM 模块的 ProcessEngineConfigurationConfigurer 实现类: |
| 53 | * | 30 | * |
| 54 | * 1. 设置各种监听器 | 31 | * 1. 设置各种监听器 |