All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.banner.lib.oss.qiniu.QiniuProperties Maven / Gradle / Ivy

There is a newer version: 0.0.2
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy