use of com.wingice.msg.ali.exception.AliClientException in project knife-starter by 1120023921.
the class KnifeSmsAliSenderContextImpl method buildClient.
private Client buildClient(AliAccount aliAccount) throws AliClientException {
final Config config = new Config().setAccessKeyId(aliAccount.getAccessKeyId()).setAccessKeySecret(aliAccount.getAccessSecret());
// 访问的域名
config.endpoint = "dysmsapi.aliyuncs.com";
try {
return new Client(config);
} catch (Exception e) {
throw new AliClientException("构造阿里云短信Client失败");
}
}
Aggregations