阿里云oss

This commit is contained in:
2023-11-21 20:05:45 +08:00
parent 2694ae6342
commit 170f6757ee

View File

@@ -17,7 +17,7 @@ public class AliyunConfig {
@Bean(destroyMethod = "shutdown")
@Lazy
public OSSClient obsClient() {
public OSSClient ossClient() {
AliyunProperty.OSSRegion ossRegion = aliyunProperty.getOSS().getRegions().stream().filter(x -> x.getCode().equalsIgnoreCase(aliyunProperty.getOSS().getRegion())).findFirst().orElseThrow(() -> new RuntimeException("region not found"));
OSSClient ossClient = new OSSClient(ossRegion.getEndpoint(), aliyunProperty.getOSS().getAk(), aliyunProperty.getOSS().getSk());