package cn.lili.cos;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.context.annotation.Configuration;
|
|
import java.util.List;
|
|
/**
|
* 读取配置文件关于cos的配置
|
*
|
* @author:xp
|
* @date:2025/5/16 16:23
|
*/
|
@Configuration
|
@ConfigurationProperties(prefix = "cos")
|
public class COSConfigProperty {
|
|
/** 腾讯ARM用户的secretId */
|
private String secretId;
|
|
/** 腾讯ARM用户的secretKey */
|
private String secretKey;
|
|
/** STS临时访问凭证有效期,单位秒,默认1800s,主账号最长2小时,子账号(ARM用户)36小时 */
|
private Integer durationSeconds;
|
|
/** bucket所在的地域 */
|
private String region;
|
|
/** bucket名称 */
|
private String bucket;
|
|
/** 访问域名 */
|
private String endpoint;
|
|
/** 预签名url过期时间(分钟) */
|
private Integer urlExpireMinute;
|
|
/** sts的权限 */
|
private String[] actions;
|
|
/** sts能操作的资源 */
|
private String[] resources;
|
|
public String getSecretId() {
|
return secretId;
|
}
|
|
public void setSecretId(String secretId) {
|
this.secretId = secretId;
|
}
|
|
public String getSecretKey() {
|
return secretKey;
|
}
|
|
public void setSecretKey(String secretKey) {
|
this.secretKey = secretKey;
|
}
|
|
public Integer getDurationSeconds() {
|
return durationSeconds;
|
}
|
|
public void setDurationSeconds(Integer durationSeconds) {
|
this.durationSeconds = durationSeconds;
|
}
|
|
public String getRegion() {
|
return region;
|
}
|
|
public void setRegion(String region) {
|
this.region = region;
|
}
|
|
public String getBucket() {
|
return bucket;
|
}
|
|
public void setBucket(String bucket) {
|
this.bucket = bucket;
|
}
|
|
public String[] getActions() {
|
return actions;
|
}
|
|
public void setActions(String[] actions) {
|
this.actions = actions;
|
}
|
|
public String[] getResources() {
|
return resources;
|
}
|
|
public void setResources(String[] resources) {
|
this.resources = resources;
|
}
|
|
public Integer getUrlExpireMinute() {
|
return urlExpireMinute;
|
}
|
|
public void setUrlExpireMinute(Integer urlExpireMinute) {
|
this.urlExpireMinute = urlExpireMinute;
|
}
|
|
public String getEndpoint() {
|
return endpoint;
|
}
|
|
public void setEndpoint(String endpoint) {
|
this.endpoint = endpoint;
|
}
|
}
|