From 0f85423b4175a89b7c067055632a234e3e9ea671 Mon Sep 17 00:00:00 2001 From: xmzhao71 Date: Wed, 6 Sep 2023 16:50:27 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=8E=BB=E6=8E=89ttl=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkCApi/pom.xml | 6 ------ mallinkService/pom.xml | 6 ------ .../service/thread/CompletableFutureWithExecutor.java | 5 ++--- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/mallinkCApi/pom.xml b/mallinkCApi/pom.xml index e639632d0..a65c4b7e4 100644 --- a/mallinkCApi/pom.xml +++ b/mallinkCApi/pom.xml @@ -28,12 +28,6 @@ mallinkOcr 1.0 - - - com.alibaba - transmittable-thread-local - 2.14.2 - diff --git a/mallinkService/pom.xml b/mallinkService/pom.xml index 37113811d..d78dee99c 100644 --- a/mallinkService/pom.xml +++ b/mallinkService/pom.xml @@ -40,12 +40,6 @@ alipay-easysdk 2.2.0 - - - com.alibaba - transmittable-thread-local - 2.14.2 - \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/service/thread/CompletableFutureWithExecutor.java b/mallinkService/src/main/java/com/iformall/service/thread/CompletableFutureWithExecutor.java index a1b62b445..eca28b815 100644 --- a/mallinkService/src/main/java/com/iformall/service/thread/CompletableFutureWithExecutor.java +++ b/mallinkService/src/main/java/com/iformall/service/thread/CompletableFutureWithExecutor.java @@ -1,6 +1,5 @@ package com.iformall.service.thread; -import com.alibaba.ttl.threadpool.TtlExecutors; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -29,10 +28,10 @@ public class CompletableFutureWithExecutor { } public static CompletableFuture supplyAsync(Supplier supplier) { - return CompletableFuture.supplyAsync(supplier, TtlExecutors.getTtlExecutorService(future.threadPoolService.getExecutorService(CORE_SIZE, MAX_SIZE))); + return CompletableFuture.supplyAsync(supplier, future.threadPoolService.getExecutorService(CORE_SIZE, MAX_SIZE)); } public static CompletableFuture runAsync(Runnable runnable) { - return CompletableFuture.runAsync(runnable, TtlExecutors.getTtlExecutorService(future.threadPoolService.getExecutorService(CORE_SIZE, MAX_SIZE))); + return CompletableFuture.runAsync(runnable, future.threadPoolService.getExecutorService(CORE_SIZE, MAX_SIZE)); } }