Просмотр исходного кода

feat:去掉ttl依赖

release_toaliyun_real
xmzhao71 2 лет назад
Родитель
Сommit
0f85423b41
3 измененных файлов: 2 добавлений и 15 удалений
  1. +0
    -6
      mallinkCApi/pom.xml
  2. +0
    -6
      mallinkService/pom.xml
  3. +2
    -3
      mallinkService/src/main/java/com/iformall/service/thread/CompletableFutureWithExecutor.java

+ 0
- 6
mallinkCApi/pom.xml Просмотреть файл

@@ -28,12 +28,6 @@
<artifactId>mallinkOcr</artifactId>
<version>1.0</version>
</dependency>
<!--TTL-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.14.2</version>
</dependency>
</dependencies>
<build>
<plugins>


+ 0
- 6
mallinkService/pom.xml Просмотреть файл

@@ -40,12 +40,6 @@
<artifactId>alipay-easysdk</artifactId>
<version>2.2.0</version>
</dependency>
<!--TTL-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>transmittable-thread-local</artifactId>
<version>2.14.2</version>
</dependency>
</dependencies>

</project>

+ 2
- 3
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 <U> CompletableFuture<U> supplyAsync(Supplier<U> 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<Void> 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));
}
}

Загрузка…
Отмена
Сохранить