perf(payment): 优化支付宝服务配置
- 设置最大空闲连接数为 5 - 设置连接超时时间为 3000毫秒 - 设置读取超时时间为 15000 毫秒 - 设置空闲连接存活时间为 10000 毫秒feature/community-center
parent
e6562cf49c
commit
9311866a61
|
@ -631,6 +631,16 @@ public class AliPayServiceImpl implements AliPayService {
|
|||
|
||||
AlipayConfig config = new AlipayConfig();
|
||||
|
||||
|
||||
//设置连接池中的最大可缓存的空闲连接数
|
||||
config.setMaxIdleConnections(5);
|
||||
//连接超时,单位:毫秒,默认3000
|
||||
config.setConnectTimeout(3000);
|
||||
//读取超时,单位:毫秒,默认15000
|
||||
config.setReadTimeout(15000);
|
||||
//空闲连接存活时间,单位:毫秒,默认10000L
|
||||
config.setKeepAliveDuration(10000L);
|
||||
|
||||
// 设置网关地址
|
||||
config.setServerUrl(aliConfig.getGatewayUrl());
|
||||
|
||||
|
|
Loading…
Reference in New Issue