# async executor
async:
corePoolSize: 20
maxPoolSize: 200
queueCapacity: 10000
# async executor
async:
corePoolSize: 20
maxPoolSize: 200
queueCapacity: 10000
# async executor async: corePoolSize: 20 maxPoolSize: 200 queueCapacity: 10000
然后代码中注入
@Autowired
private SpringAsyncExecutor asyncExecutor;
@Autowired
private SpringAsyncExecutor asyncExecutor;
@Autowired private SpringAsyncExecutor asyncExecutor;
使用
Future<Map<Integer, String>> xxxFuture =
asyncExecutor.async(() -> xxxCall);
Future<Map<Integer, String>> xxxFuture =
asyncExecutor.async(() -> xxxCall);
Future<Map<Integer, String>> xxxFuture = asyncExecutor.async(() -> xxxCall);