| | |
| | | import io.minio.http.Method; |
| | | import io.minio.messages.DeleteError; |
| | | import io.minio.messages.DeleteObject; |
| | | import lombok.Getter; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Value("${minio.preview-expiry}") |
| | | private Integer previewExpiry; |
| | | |
| | | /** |
| | | * -- GETTER -- |
| | | * 获取默认存储桶名称 |
| | | * |
| | | * @return |
| | | */ |
| | | @Getter |
| | | @Value("${minio.default-bucket}") |
| | | private String defaultBucket; |
| | | |
| | | /** |
| | | * 判断存储桶是否存在,不存在则创建 |
| | |
| | | .build() |
| | | ); |
| | | } catch (Exception e) { |
| | | throw new UtilException("MinioUtils:上传文件工具类异常"); |
| | | throw new UtilException("MinioUtils:上传文件工具类异常:" + e); |
| | | } |
| | | MinioResult minioResult = new MinioResult(); |
| | | minioResult.setBucketFileName(bucketFilePath); |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |