com.gitee.summer9102.develop.common.httpclient.HttpClientProperties Maven / Gradle / Ivy
package com.gitee.summer9102.develop.common.httpclient;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "http.client")
public class HttpClientProperties {
/**
* 是否启用 httpclient
*/
private boolean enabled = false;
/**
* 最大连接数
*/
private int httpMaxPoolSize = 20;
/**
* 获取/建立连接超时时间
*/
private int connectTimeout = 10000;
/**
* 获取数据超时时间
*/
private int socketTimeout = 30000;
/**
* 最大空闲时间
*/
private int maxIdleTime = 30000;
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public int getHttpMaxPoolSize() {
return httpMaxPoolSize;
}
public void setHttpMaxPoolSize(int httpMaxPoolSize) {
this.httpMaxPoolSize = httpMaxPoolSize;
}
public int getConnectTimeout() {
return connectTimeout;
}
public void setConnectTimeout(int connectTimeout) {
this.connectTimeout = connectTimeout;
}
public int getSocketTimeout() {
return socketTimeout;
}
public void setSocketTimeout(int socketTimeout) {
this.socketTimeout = socketTimeout;
}
public int getMaxIdleTime() {
return maxIdleTime;
}
public void setMaxIdleTime(int maxIdleTime) {
this.maxIdleTime = maxIdleTime;
}
}