groupId 从 org.liuxp 改为 me.liuxp
This commit is contained in:
parent
81e04b803a
commit
c48753a64b
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-application</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-all-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!--Swagger工具包 knife4j -->
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -18,15 +18,15 @@
|
|||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-definition</artifactId>
|
||||
</dependency>
|
||||
<!-- google图片压缩 -->
|
||||
|
|
|
@ -12,7 +12,7 @@ import java.io.InputStream;
|
|||
* @author contact@liuxp.me
|
||||
* @since 2024/05/23
|
||||
*/
|
||||
public class MinioPlusCommonUtil {
|
||||
public class CommonUtil {
|
||||
|
||||
/**
|
||||
* 取得对象名称
|
||||
|
@ -20,7 +20,7 @@ public class MinioPlusCommonUtil {
|
|||
* @return 对象名称
|
||||
*/
|
||||
public static String getObjectName(String md5){
|
||||
return MinioPlusCommonUtil.getPathByDate() + "/" + md5;
|
||||
return CommonUtil.getPathByDate() + "/" + md5;
|
||||
}
|
||||
|
||||
/**
|
|
@ -10,7 +10,7 @@ import org.liuxp.minioplus.common.config.MinioPlusProperties;
|
|||
import org.liuxp.minioplus.common.enums.MinioPlusErrorCode;
|
||||
import org.liuxp.minioplus.common.enums.StorageBucketEnums;
|
||||
import org.liuxp.minioplus.common.exception.MinioPlusException;
|
||||
import org.liuxp.minioplus.core.common.utils.MinioPlusCommonUtil;
|
||||
import org.liuxp.minioplus.core.common.utils.CommonUtil;
|
||||
import org.liuxp.minioplus.core.engine.StorageEngineService;
|
||||
import org.liuxp.minioplus.core.repository.MetadataRepository;
|
||||
import org.liuxp.minioplus.api.model.bo.CreateUploadUrlReqBO;
|
||||
|
@ -423,15 +423,15 @@ public class StorageEngineServiceImpl implements StorageEngineService {
|
|||
public Boolean createFile(FileMetadataInfoSaveDTO saveDTO, byte[] fileBytes) {
|
||||
|
||||
// 写入文件
|
||||
minioS3Client.putObject(saveDTO.getStorageBucket(), MinioPlusCommonUtil.getObjectName(saveDTO.getFileMd5()), new ByteArrayInputStream(fileBytes), saveDTO.getFileSize(), saveDTO.getFileMimeType());
|
||||
minioS3Client.putObject(saveDTO.getStorageBucket(), CommonUtil.getObjectName(saveDTO.getFileMd5()), new ByteArrayInputStream(fileBytes), saveDTO.getFileSize(), saveDTO.getFileMimeType());
|
||||
|
||||
// 判断是否生成缩略图
|
||||
if(Boolean.TRUE.equals(saveDTO.getIsPreview())){
|
||||
|
||||
try{
|
||||
ByteArrayOutputStream largeImage = MinioPlusCommonUtil.resizeImage(new ByteArrayInputStream(fileBytes), properties.getThumbnail().getSize());
|
||||
ByteArrayOutputStream largeImage = CommonUtil.resizeImage(new ByteArrayInputStream(fileBytes), properties.getThumbnail().getSize());
|
||||
byte[] largeImageBytes = largeImage.toByteArray();
|
||||
minioS3Client.putObject(StorageBucketEnums.IMAGE_PREVIEW.getCode(), MinioPlusCommonUtil.getObjectName(saveDTO.getFileMd5()), new ByteArrayInputStream(largeImageBytes), largeImageBytes.length, saveDTO.getFileMimeType());
|
||||
minioS3Client.putObject(StorageBucketEnums.IMAGE_PREVIEW.getCode(), CommonUtil.getObjectName(saveDTO.getFileMd5()), new ByteArrayInputStream(largeImageBytes), largeImageBytes.length, saveDTO.getFileMimeType());
|
||||
}catch(Exception e){
|
||||
log.error(MinioPlusErrorCode.FILE_PREVIEW_WRITE_FAILED.getMessage(),e);
|
||||
throw new MinioPlusException(MinioPlusErrorCode.FILE_PREVIEW_WRITE_FAILED);
|
||||
|
@ -733,7 +733,7 @@ public class StorageEngineServiceImpl implements StorageEngineService {
|
|||
* @return {@link ListParts} 分片任务信息
|
||||
*/
|
||||
private ListParts buildResultPart(FileMetadataInfoVo metadataInfo){
|
||||
String objectName = MinioPlusCommonUtil.getObjectName(metadataInfo.getFileMd5());
|
||||
String objectName = CommonUtil.getObjectName(metadataInfo.getFileMd5());
|
||||
// 获取所有的分片信息
|
||||
return minioS3Client.listParts(metadataInfo.getStorageBucket(), objectName, metadataInfo.getPartNumber(), metadataInfo.getUploadTaskId());
|
||||
}
|
||||
|
@ -757,7 +757,7 @@ public class StorageEngineServiceImpl implements StorageEngineService {
|
|||
// 存储桶
|
||||
bucketName = bo.getStorageBucket();
|
||||
// 存储路径
|
||||
storagePath = MinioPlusCommonUtil.getObjectName(bo.getFileMd5());
|
||||
storagePath = CommonUtil.getObjectName(bo.getFileMd5());
|
||||
// 文件key
|
||||
fileKey = bo.getFileKey();
|
||||
uploadId = bo.getUploadId();
|
||||
|
@ -778,7 +778,7 @@ public class StorageEngineServiceImpl implements StorageEngineService {
|
|||
// 文件key
|
||||
fileKey = IdUtil.fastSimpleUUID();
|
||||
// 存储路径
|
||||
storagePath = MinioPlusCommonUtil.getPathByDate();
|
||||
storagePath = CommonUtil.getPathByDate();
|
||||
|
||||
// 存储桶
|
||||
bucketName = StorageBucketEnums.getBucketByFileSuffix(suffix);
|
||||
|
@ -798,10 +798,10 @@ public class StorageEngineServiceImpl implements StorageEngineService {
|
|||
uploadId = fileKey;
|
||||
} else {
|
||||
// 创建分片请求,获取uploadId
|
||||
uploadId = minioS3Client.createMultipartUpload(bucketName,MinioPlusCommonUtil.getObjectName(bo.getFileMd5()));
|
||||
uploadId = minioS3Client.createMultipartUpload(bucketName, CommonUtil.getObjectName(bo.getFileMd5()));
|
||||
long start = 0;
|
||||
for (Integer partNumber = 1; partNumber <= chunkNum; partNumber++) {
|
||||
FileCheckResultVo.Part part = this.buildResultPart(bucketName,MinioPlusCommonUtil.getObjectName(bo.getFileMd5()), uploadId, bo.getFileSize(), start, partNumber);
|
||||
FileCheckResultVo.Part part = this.buildResultPart(bucketName, CommonUtil.getObjectName(bo.getFileMd5()), uploadId, bo.getFileSize(), start, partNumber);
|
||||
// 更改下一次的开始位置
|
||||
start = start + properties.getPart().getSize();
|
||||
partList.add(part);
|
||||
|
|
|
@ -20,7 +20,7 @@ import org.liuxp.minioplus.common.enums.MinioPlusErrorCode;
|
|||
import org.liuxp.minioplus.common.enums.StorageBucketEnums;
|
||||
import org.liuxp.minioplus.common.exception.MinioPlusException;
|
||||
import org.liuxp.minioplus.core.common.utils.ContentTypeUtil;
|
||||
import org.liuxp.minioplus.core.common.utils.MinioPlusCommonUtil;
|
||||
import org.liuxp.minioplus.core.common.utils.CommonUtil;
|
||||
import org.liuxp.minioplus.api.model.vo.FileMetadataInfoVo;
|
||||
import org.liuxp.minioplus.core.engine.StorageEngineService;
|
||||
import org.liuxp.minioplus.core.repository.MetadataRepository;
|
||||
|
@ -198,7 +198,7 @@ public class StorageServiceImpl implements StorageService {
|
|||
String storageBucket = StorageBucketEnums.getBucketByFileSuffix(suffix);
|
||||
|
||||
// 取得存储路径
|
||||
String storagePath = MinioPlusCommonUtil.getPathByDate();
|
||||
String storagePath = CommonUtil.getPathByDate();
|
||||
|
||||
// 是否存在缩略图
|
||||
Boolean isPreview = properties.getThumbnail().isEnable() && StorageBucketEnums.IMAGE.getCode().equals(storageBucket);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-spring-boot-starter</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -14,11 +14,11 @@
|
|||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-extension</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-official</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-s3-api</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -18,11 +18,11 @@
|
|||
<artifactId>hutool-all</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-definition</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-s3-api</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-s3-api</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -30,11 +30,11 @@
|
|||
<version>4.11.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-definition</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
18
pom.xml
18
pom.xml
|
@ -4,7 +4,7 @@
|
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-parent</artifactId>
|
||||
<version>${revision}</version>
|
||||
<packaging>pom</packaging>
|
||||
|
@ -137,42 +137,42 @@
|
|||
<version>${thumbnailator.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-common</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-extension</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-plus-all-spring-boot-starter</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-definition</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-custom</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.liuxp</groupId>
|
||||
<groupId>me.liuxp</groupId>
|
||||
<artifactId>minio-s3-api-official</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
|
Loading…
Reference in New Issue