com.github.xiaoyuge5201.props.AliYunSMSProperties Maven / Gradle / Ivy
The newest version!
package com.github.xiaoyuge5201.props;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.time.Duration;
/**
* 阿里雲短信配置
*
* @author yugb
*/
@ConfigurationProperties(prefix = "sms.aliyun")
public class AliYunSMSProperties {
/**
* 节点信息(默认不填)
*/
private String endPoint = "cn-hangzhou";
/**
* 区域Id
*/
private String regionId = "cn-hangzhou";
/**
* 产品名称
*/
private String product = "Dysmsapi";
/**
* 域名路径
*/
private String domainUrl = "dysmsapi.aliyuncs.com";
/**
* 开发者自己的AK(在阿里云访问控制台寻找)
*/
private String accessKeyId;
/**
* 密钥
*/
private String accessKeySecret;
/**
* 签名
*/
private String signName;
/**
* 连接过期时间
*/
private Duration connectionTimeout = Duration.ofSeconds(120);
/**
* 读取过期时间
*/
private Duration readTimeout = Duration.ofSeconds(120);
public String getEndPoint() {
return endPoint;
}
public void setEndPoint(String endPoint) {
this.endPoint = endPoint;
}
public String getProduct() {
return product;
}
public void setProduct(String product) {
this.product = product;
}
public String getDomainUrl() {
return domainUrl;
}
public void setDomainUrl(String domainUrl) {
this.domainUrl = domainUrl;
}
public Duration getConnectionTimeout() {
return connectionTimeout;
}
public void setConnectionTimeout(Duration connectionTimeout) {
this.connectionTimeout = connectionTimeout;
}
public Duration getReadTimeout() {
return readTimeout;
}
public void setReadTimeout(Duration readTimeout) {
this.readTimeout = readTimeout;
}
public String getAccessKeyId() {
return accessKeyId;
}
public void setAccessKeyId(String accessKeyId) {
this.accessKeyId = accessKeyId;
}
public String getAccessKeySecret() {
return accessKeySecret;
}
public void setAccessKeySecret(String accessKeySecret) {
this.accessKeySecret = accessKeySecret;
}
public String getSignName() {
return signName;
}
public void setSignName(String signName) {
this.signName = signName;
}
public String getRegionId() {
return regionId;
}
public void setRegionId(String regionId) {
this.regionId = regionId;
}
@Override
public String toString() {
return "AliYunSMSProperties{" +
"endPoint='" + endPoint + '\'' +
", regionId='" + regionId + '\'' +
", product='" + product + '\'' +
", domainUrl='" + domainUrl + '\'' +
", accessKeyId='" + accessKeyId + '\'' +
", accessKeySecret='" + accessKeySecret + '\'' +
", signName='" + signName + '\'' +
", connectionTimeout=" + connectionTimeout +
", readTimeout=" + readTimeout +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy