增加@Qualifier

This commit is contained in:
guoshengxiong 2024-11-29 11:14:35 +08:00
parent cc5fff0bde
commit b6414be613
3 changed files with 5 additions and 1 deletions

View File

@ -65,7 +65,7 @@ public class AsyncTaskTheadPoolConfig {
return threadPoolTaskScheduler;
}
@Bean
@Bean(name = "wflowThreadPool")
public ExecutorService getExecutorService(ThreadPoolTaskExecutor executor){
return Executors.newCachedThreadPool(executor);
}

View File

@ -28,6 +28,7 @@ import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.engine.task.Comment;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
@ -48,6 +49,7 @@ public class UELTools {
private UserDeptOrLeaderService userDeptOrLeaderService;
@Autowired
@Qualifier("wflowThreadPool")
private ExecutorService executorService;
@Autowired

View File

@ -18,6 +18,7 @@ import com.wflow.workflow.config.WflowGlobalVarDef;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.RuntimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import java.util.HashSet;
@ -41,6 +42,7 @@ public class ListenerExecutor {
private UELTools uelTools;
@Autowired
@Qualifier("wflowThreadPool")
private ExecutorService executorService;
public Object doProcessChangeHandler(String event, String instanceId, String defId){