七牛oss地域改为自动识别

This commit is contained in:
smallchill 2021-02-22 16:14:52 +08:00
parent 3200b9b14c
commit 4e875325ea

View File

@ -52,7 +52,7 @@ public class QiniuConfiguration {
@Bean
public com.qiniu.storage.Configuration qiniuConfiguration() {
return new com.qiniu.storage.Configuration(Zone.zone0());
return new com.qiniu.storage.Configuration(Zone.autoZone());
}
@Bean
@ -69,7 +69,7 @@ public class QiniuConfiguration {
@Bean
@ConditionalOnBean(com.qiniu.storage.Configuration.class)
public BucketManager bucketManager(com.qiniu.storage.Configuration cfg) {
return new BucketManager(auth(), cfg);
return new BucketManager(Auth.create(ossProperties.getAccessKey(), ossProperties.getSecretKey()), cfg);
}
@Bean