Merge branch 'dev' of https://gitee.com/iotkit-open-source/iotkit-parent
commit
5bc279bb7e
|
@ -10,6 +10,8 @@ import org.springframework.stereotype.Component;
|
|||
@Data
|
||||
public class AliyunConfig {
|
||||
|
||||
private String bucketId;
|
||||
|
||||
private String endpoint;
|
||||
|
||||
private String accessKeyId;
|
||||
|
|
|
@ -129,7 +129,7 @@ public class ProductController {
|
|||
}
|
||||
|
||||
fileName = "product/" + productKey + "/cover" + end;
|
||||
String bucket = "iotkit-img";
|
||||
String bucket = aliyunConfig.getBucketId();
|
||||
// 填写Bucket名称和Object完整路径。Object完整路径中不能包含Bucket名称。
|
||||
PutObjectResult result = ossClient.putObject(bucket, fileName,
|
||||
file.getInputStream());
|
||||
|
|
|
@ -35,6 +35,7 @@ spring:
|
|||
matching-strategy: ant_path_matcher
|
||||
|
||||
aliyun:
|
||||
bucketId: 填写阿里云bucketId
|
||||
endpoint: oss-cn-shenzhen.aliyuncs.com
|
||||
accessKeyId: 填写阿里云accessKeyId
|
||||
accessKeySecret: 填写阿里云accessKeySecret
|
||||
|
|
|
@ -33,6 +33,7 @@ spring:
|
|||
matching-strategy: ant_path_matcher
|
||||
|
||||
aliyun:
|
||||
bucketId: 填写阿里云bucketId
|
||||
endpoint: oss-cn-shenzhen.aliyuncs.com
|
||||
accessKeyId: 填写阿里云accessKeyId
|
||||
accessKeySecret: 填写阿里云accessKeySecret
|
||||
|
|
Loading…
Reference in New Issue