Przeglądaj źródła

feat:去掉ttl依赖

release_toaliyun_real
xmzhao71 2 lat temu
rodzic
commit
0f85423b41
3 zmienionych plików z 2 dodań i 15 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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 Wyświetl plik

@@ -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));
}
}

Ładowanie…
Anuluj
Zapisz