|
|
@@ -1,5 +1,7 @@ |
|
|
|
package com.telpo.dipperposition.config; |
|
|
|
|
|
|
|
import lombok.Getter; |
|
|
|
import lombok.Setter; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
@@ -17,6 +19,8 @@ import java.util.concurrent.ThreadPoolExecutor; |
|
|
|
* @author: linwl |
|
|
|
* @create: 2020-07-11 09:17 |
|
|
|
*/ |
|
|
|
@Getter |
|
|
|
@Setter |
|
|
|
@Configuration |
|
|
|
@Slf4j |
|
|
|
public class AsyncExecutorConfig implements AsyncConfigurer { |
|
|
@@ -30,6 +34,19 @@ public class AsyncExecutorConfig implements AsyncConfigurer { |
|
|
|
@Value("${async.pool.queueCapacity}") |
|
|
|
private int queueCapacity; |
|
|
|
|
|
|
|
|
|
|
|
@Value(value = "${position.server.serverAddr}") |
|
|
|
private String serverAddr; |
|
|
|
|
|
|
|
@Value(value = "${position.server.timeAsycPort}") |
|
|
|
private String timeAsycServerPort; |
|
|
|
|
|
|
|
@Value(value = "${position.server.posAsycPort}") |
|
|
|
private String posAsycServerPort; |
|
|
|
|
|
|
|
@Value(value = "${position.server.starsAsycPort}") |
|
|
|
private String starsAsycServerPort; |
|
|
|
|
|
|
|
@Bean(name = "asyncServiceExecutor") |
|
|
|
public Executor asyncServiceExecutor() { |
|
|
|
log.info("start asyncServiceExecutor"); |
|
|
|