From 693a33f660891c98b8b95490d020c428c5da9871 Mon Sep 17 00:00:00 2001 From: 抓蛙师 <770492966@qq.com> Date: 星期一, 19 九月 2022 21:46:32 +0800 Subject: [PATCH] 完善功能:前端可以配置多排序参数支持依次排序 如:{isAsc:"asc",orderByColumn:"id"} {isAsc:"asc",orderByColumn:"id,createTime"} {isAsc:"asc,desc",orderByColumn:"id,createTime"} 共三种配置方式 --- ruoyi-oss/src/main/java/com/ruoyi/oss/core/OssClient.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/core/OssClient.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/core/OssClient.java index f0776dc..15833d3 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/core/OssClient.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/core/OssClient.java @@ -10,6 +10,7 @@ import com.amazonaws.client.builder.AwsClientBuilder; import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3Client; +import com.amazonaws.services.s3.AmazonS3ClientBuilder; import com.amazonaws.services.s3.model.*; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; @@ -51,14 +52,16 @@ } else { clientConfig.setProtocol(Protocol.HTTP); } - this.client = AmazonS3Client.builder() + AmazonS3ClientBuilder build = AmazonS3Client.builder() .withEndpointConfiguration(endpointConfig) .withClientConfiguration(clientConfig) .withCredentials(credentialsProvider) - .disableChunkedEncoding() - // https闄愬埗浣跨敤鍩熷悕璁块棶 闇�瑕佹閰嶇疆 绔欑偣濉煙鍚� - .enablePathStyleAccess() - .build(); + .disableChunkedEncoding(); + if (!StringUtils.containsAny(properties.getEndpoint(), OssConstant.CLOUD_SERVICE)){ + // minio 浣跨敤https闄愬埗浣跨敤鍩熷悕璁块棶 闇�瑕佹閰嶇疆 绔欑偣濉煙鍚� + build.enablePathStyleAccess(); + } + this.client = build.build(); createBucket(); } catch (Exception e) { -- Gitblit v1.9.3