top.banner.lib.oss.qiniu.QiniuProperties Maven / Gradle / Ivy
package top.banner.lib.oss.qiniu;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "spring.oss.qiniu")
public class QiniuProperties {
/**
* accessKey
*/
private String accessKey;
/**
* secretKey
*/
private String secretKey;
/**
* 七牛云 bucket
*/
private String bucket;
/**
* 地区
* https://developer.qiniu.com/kodo/1671/region-endpoint-fq
*/
private String region;
/**
* bucket 绑定的域名
*/
private String urlPrefix;
public String getAccessKey() {
return accessKey;
}
public void setAccessKey(String accessKey) {
this.accessKey = accessKey;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
public String getBucket() {
return bucket;
}
public void setBucket(String bucket) {
this.bucket = bucket;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getUrlPrefix() {
if (urlPrefix.endsWith("/")) {
urlPrefix = urlPrefix.substring(0, urlPrefix.lastIndexOf("/"));
}
return urlPrefix;
}
public void setUrlPrefix(String urlPrefix) {
this.urlPrefix = urlPrefix;
}
}