CloudStorageProperties.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. package com.ruoyi.oss.properties;
  2. import lombok.Data;
  3. import lombok.NoArgsConstructor;
  4. import org.springframework.boot.context.properties.ConfigurationProperties;
  5. import org.springframework.stereotype.Component;
  6. /**
  7. * OSS云存储 配置属性
  8. *
  9. * @author Lion Li
  10. */
  11. @Data
  12. @Component
  13. @ConfigurationProperties(prefix = "cloud-storage")
  14. public class CloudStorageProperties {
  15. private QiniuProperties qiniu;
  16. private AliyunProperties aliyun;
  17. private QcloudProperties qcloud;
  18. private MinioProperties minio;
  19. /**
  20. * 阿里云 配置属性
  21. *
  22. * @author Lion Li
  23. */
  24. @Data
  25. @NoArgsConstructor
  26. public static class AliyunProperties {
  27. /**
  28. * 阿里云绑定的域名
  29. */
  30. private String endpoint;
  31. /**
  32. * 阿里云路径前缀
  33. */
  34. private String prefix;
  35. /**
  36. * 阿里云AccessKeyId
  37. */
  38. private String accessKeyId;
  39. /**
  40. * 阿里云AccessKeySecret
  41. */
  42. private String accessKeySecret;
  43. /**
  44. * 阿里云BucketName
  45. */
  46. private String bucketName;
  47. }
  48. /**
  49. * Minio 配置属性
  50. *
  51. * @author Lion Li
  52. */
  53. @Data
  54. @NoArgsConstructor
  55. public static class MinioProperties {
  56. /**
  57. * minio域名
  58. */
  59. private String endpoint;
  60. /**
  61. * minio ACCESS_KEY
  62. */
  63. private String accessKey;
  64. /**
  65. * minio SECRET_KEY
  66. */
  67. private String secretKey;
  68. /**
  69. * minio 存储空间名
  70. */
  71. private String bucketName;
  72. }
  73. /**
  74. * 腾讯云COS 配置属性
  75. *
  76. * @author Lion Li
  77. */
  78. @Data
  79. @NoArgsConstructor
  80. public static class QcloudProperties {
  81. /**
  82. * 腾讯云绑定的域名
  83. */
  84. private String domain;
  85. /**
  86. * 腾讯云路径前缀
  87. */
  88. private String prefix;
  89. /**
  90. * 腾讯云appId
  91. */
  92. private String appId;
  93. /**
  94. * 腾讯云SecretId
  95. */
  96. private String secretId;
  97. /**
  98. * 腾讯云SecretKey
  99. */
  100. private String secretKey;
  101. /**
  102. * 腾讯云BucketName
  103. */
  104. private String bucketName;
  105. /**
  106. * 腾讯云COS所属地区
  107. */
  108. private String region;
  109. }
  110. /**
  111. * 七牛云 配置属性
  112. *
  113. * @author Lion Li
  114. */
  115. @Data
  116. @NoArgsConstructor
  117. public static class QiniuProperties {
  118. /**
  119. * 七牛绑定的域名
  120. */
  121. private String domain;
  122. /**
  123. * 七牛路径前缀
  124. */
  125. private String prefix;
  126. /**
  127. * 七牛ACCESS_KEY
  128. */
  129. private String accessKey;
  130. /**
  131. * 七牛SECRET_KEY
  132. */
  133. private String secretKey;
  134. /**
  135. * 七牛存储空间名
  136. */
  137. private String bucketName;
  138. /**
  139. * 七牛存储区域
  140. */
  141. private String region;
  142. /**
  143. * 七牛存储区域
  144. */
  145. private Boolean isHttps;
  146. }
  147. }