xiangpei
2025-06-02 1771aa17eb020c4ef22bc8addf83ed2ae97cdfac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
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;
    }
}