Ver a proveniência

feat:去掉ttl依赖

release_toaliyun_real
xmzhao71 há 2 anos
ascendente
cometimento
0f85423b41
3 ficheiros alterados com 2 adições e 15 eliminações
  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 Ver ficheiro

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


+ 0
- 6
mallinkService/pom.xml Ver ficheiro

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


</project> </project>

+ 2
- 3
mallinkService/src/main/java/com/iformall/service/thread/CompletableFutureWithExecutor.java Ver ficheiro

@@ -1,6 +1,5 @@
package com.iformall.service.thread; package com.iformall.service.thread;


import com.alibaba.ttl.threadpool.TtlExecutors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;


@@ -29,10 +28,10 @@ public class CompletableFutureWithExecutor {
} }


public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) { 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) { 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));
} }
} }

Carregando…
Cancelar
Guardar