huanghongfa
2021-01-11 0273c333ed5c86822be1f56623e3e6bab90ec2f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.panzhihua.common.constants;
 
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description:
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2021-01-08 10:40
 **/
public class HttpConstant {
 
    /**httpClient连接超时时间,单位毫秒 */
    public static final int CONNECT_TIMEOUT = 3*1000;
 
    /**httpClient请求获取数据的超时时间(即响应时间) 单位毫秒*/
    public static final int SOCKET_TIMEOUT = 10*1000;
 
    /**http连接池大小*/
    public static final int MAX_TOTAL = 10;
 
    /**分配给同一个route(路由)最大的并发连接数*/
    public static final int MAX_CONN_PER_ROUTE = 2;
 
    /**http连接是否是长连接*/
    public static final boolean IS_KEEP_ALIVE = true;
 
    /**调用接口失败默认重新调用次数*/
    public static final int REQ_TIMES = 3;
 
    /**utf-8编码*/
    public static final String UTF8_ENCODE = "UTF-8";
 
    /** application/json */
    public static final String APPLICATION_JSON = "application/json";
 
    /** text/xml */
    public static final String TEXT_XML = "text/xml";
}