| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- package com.ruoyi.oss.properties;
- import lombok.Data;
- import lombok.NoArgsConstructor;
- import org.springframework.boot.context.properties.ConfigurationProperties;
- import org.springframework.stereotype.Component;
- /**
- * OSS云存储 配置属性
- *
- * @author Lion Li
- */
- @Data
- @Component
- @ConfigurationProperties(prefix = "cloud-storage")
- public class CloudStorageProperties {
- private QiniuProperties qiniu;
- private AliyunProperties aliyun;
- private QcloudProperties qcloud;
- private MinioProperties minio;
- /**
- * 阿里云 配置属性
- *
- * @author Lion Li
- */
- @Data
- @NoArgsConstructor
- public static class AliyunProperties {
- /**
- * 阿里云绑定的域名
- */
- private String endpoint;
- /**
- * 阿里云路径前缀
- */
- private String prefix;
- /**
- * 阿里云AccessKeyId
- */
- private String accessKeyId;
- /**
- * 阿里云AccessKeySecret
- */
- private String accessKeySecret;
- /**
- * 阿里云BucketName
- */
- private String bucketName;
- }
- /**
- * Minio 配置属性
- *
- * @author Lion Li
- */
- @Data
- @NoArgsConstructor
- public static class MinioProperties {
- /**
- * minio域名
- */
- private String endpoint;
- /**
- * minio ACCESS_KEY
- */
- private String accessKey;
- /**
- * minio SECRET_KEY
- */
- private String secretKey;
- /**
- * minio 存储空间名
- */
- private String bucketName;
- }
- /**
- * 腾讯云COS 配置属性
- *
- * @author Lion Li
- */
- @Data
- @NoArgsConstructor
- public static class QcloudProperties {
- /**
- * 腾讯云绑定的域名
- */
- private String domain;
- /**
- * 腾讯云路径前缀
- */
- private String prefix;
- /**
- * 腾讯云appId
- */
- private String appId;
- /**
- * 腾讯云SecretId
- */
- private String secretId;
- /**
- * 腾讯云SecretKey
- */
- private String secretKey;
- /**
- * 腾讯云BucketName
- */
- private String bucketName;
- /**
- * 腾讯云COS所属地区
- */
- private String region;
- }
- /**
- * 七牛云 配置属性
- *
- * @author Lion Li
- */
- @Data
- @NoArgsConstructor
- public static class QiniuProperties {
- /**
- * 七牛绑定的域名
- */
- private String domain;
- /**
- * 七牛路径前缀
- */
- private String prefix;
- /**
- * 七牛ACCESS_KEY
- */
- private String accessKey;
- /**
- * 七牛SECRET_KEY
- */
- private String secretKey;
- /**
- * 七牛存储空间名
- */
- private String bucketName;
- /**
- * 七牛存储区域
- */
- private String region;
- /**
- * 七牛存储区域
- */
- private Boolean isHttps;
- }
- }
|