疯狂的狮子li
2021-10-20 82f1f5d0cf1b51a5d81915e842e01760f404fa74
ruoyi-oss/src/main/java/com/ruoyi/oss/properties/CloudStorageProperties.java
@@ -1,185 +1,55 @@
package com.ruoyi.oss.properties;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.Date;
/**
 * OSS云存储 配置属性
 * 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;
   /**
    * 域名
    */
   private String endpoint;
   /**
    * 阿里云 配置属性
    *
    * @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;
   }
   private String prefix;
   /**
    * Minio 配置属性
    *
    * @author Lion Li
    * ACCESS_KEY
    */
   @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;
   }
   private String accessKey;
   /**
    * 腾讯云COS 配置属性
    *
    * @author Lion Li
    * SECRET_KEY
    */
   @Data
   @NoArgsConstructor
   public static class QcloudProperties {
      /**
       * 腾讯云绑定的域名
       */
      private String endpoint;
      /**
       * 腾讯云路径前缀
       */
      private String prefix;
      /**
       * 腾讯云SecretId
       */
      private String secretId;
      /**
       * 腾讯云SecretKey
       */
      private String secretKey;
      /**
       * 腾讯云BucketName
       */
      private String bucketName;
      /**
       * 七牛是否使用https
       */
      private Boolean isHttps;
      /**
       * 腾讯云COS所属地区
       */
      private String region;
   }
   private String secretKey;
   /**
    * 七牛云 配置属性
    *
    * @author Lion Li
    * 存储空间名
    */
   @Data
   @NoArgsConstructor
   public static class QiniuProperties {
   private String bucketName;
      /**
       * 七牛绑定的域名
       */
      private String domain;
   /**
    * 存储区域
    */
   private String region;
      /**
       * 七牛路径前缀
       */
      private String prefix;
   /**
    * 是否https(Y=是,N=否)
    */
   private String isHttps;
      /**
       * 七牛ACCESS_KEY
       */
      private String accessKey;
      /**
       * 七牛SECRET_KEY
       */
      private String secretKey;
      /**
       * 七牛存储空间名
       */
      private String bucketName;
      /**
       * 七牛存储区域
       */
      private String region;
      /**
       * 七牛是否使用https
       */
      private Boolean isHttps;
   }
   /**
    * 更新时间
    */
   private Date updateTime;
}