mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-26 04:39:26 +08:00
minio分片上传
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package xyz.playedu.api.config;
|
||||
|
||||
import io.minio.MinioAsyncClient;
|
||||
import io.minio.MinioClient;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import xyz.playedu.api.vendor.PlayEduMinioClient;
|
||||
|
||||
/**
|
||||
* @Author 杭州白书科技有限公司
|
||||
@@ -36,4 +38,10 @@ public class MinioConfig {
|
||||
.credentials(this.accessKey, this.secretKey)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PlayEduMinioClient getPlayEduMinioClient() {
|
||||
MinioAsyncClient client = PlayEduMinioClient.builder().endpoint(this.endPoint).credentials(this.accessKey, this.secretKey).build();
|
||||
return new PlayEduMinioClient(client);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user