wangmengmeng
2025-04-26 96250617dbbefce55b5966c94880e2b07b6c98df
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
package com.dji.sample.component.oss.model;
 
import com.dji.sdk.cloudapi.storage.OssTypeEnum;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
/**
 * @author sean
 * @version 0.2
 * @date 2021/12/9
 */
@ConfigurationProperties(prefix = "oss")
@Component
public class OssConfiguration {
 
    /**
     * @see OssTypeEnum
     */
    public static OssTypeEnum provider;
 
    /**
     * Whether to use the object storage service.
     */
    public static boolean enable;
 
    /**
     * The protocol needs to be included at the beginning of the address.
     */
    public static String endpoint;
 
    public static String endpointSpare;
 
    public static String accessKey;
 
    public static String secretKey;
 
    public static String region;
 
    public static Long expire;
 
    public static String roleSessionName;
 
    public static String roleArn;
 
    public static String bucket;
 
    public static String objectDirPrefix;
 
    public void setProvider(OssTypeEnum provider) {
        OssConfiguration.provider = provider;
    }
 
    public void setEnable(boolean enable) {
        OssConfiguration.enable = enable;
    }
 
    public void setEndpoint(String endpoint) {
        OssConfiguration.endpoint = endpoint;
    }
 
    public void setAccessKey(String accessKey) {
        OssConfiguration.accessKey = accessKey;
    }
 
    public void setSecretKey(String secretKey) {
        OssConfiguration.secretKey = secretKey;
    }
 
    public void setRegion(String region) {
        OssConfiguration.region = region;
    }
 
    public void setExpire(Long expire) {
        OssConfiguration.expire = expire;
    }
 
    public void setRoleSessionName(String roleSessionName) {
        OssConfiguration.roleSessionName = roleSessionName;
    }
 
    public void setRoleArn(String roleArn) {
        OssConfiguration.roleArn = roleArn;
    }
 
    public void setBucket(String bucket) {
        OssConfiguration.bucket = bucket;
    }
 
    public void setObjectDirPrefix(String objectDirPrefix) {
        OssConfiguration.objectDirPrefix = objectDirPrefix;
    }
 
    public void setEndpointSpare(String endpointSpare) {
        OssConfiguration.endpointSpare = endpointSpare;
    }
}