qimu666/qi-api

腾讯云cosHost判断异常(判非空需改为判空)

Closed this issue · 1 comments

@bean
public COSClient cosClient() {
if (StringUtils.isBlank(cosHost)) {
throw new RuntimeException("cosHost未配置");
}
// 初始化用户身份信息(secretId, secretKey)
COSCredentials cred = new BasicCOSCredentials(accessKey, secretKey);
// 设置bucket的区域, COS地域的简称请参照 https://www.qcloud.com/document/product/436/6224
ClientConfig clientConfig = new ClientConfig(new Region(region));
// 生成cos客户端
return new COSClient(cred, clientConfig);
}

感谢更正