Closed dayuange123 closed 1 month ago
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
`OssProperties.Aliyun aliyun = ossProperties.getAliyun(); STSAssumeRoleSessionCredentialsProvider credentialsProvider = CredentialsProviderFactory.newSTSAssumeRoleSessionCredentialsProvider( aliyun.getRegionId(), aliyun.getAccessKey(), aliyun.getSecretKey(), aliyun.getRoleArn());
// 创建ClientBuilderConfiguration实例。
ClientBuilderConfiguration conf = new ClientBuilderConfiguration();
// 创建OSSClient实例。
this.ossClient = new OSSClientBuilder().build(aliyun.getEndpoint(), credentialsProvider, conf);`
PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, key, inputStream);
// 上传文件。
PutObjectResult result = ossClient.putObject(putObjectRequest);
好像是刚发布上去可以 ,过一段时间就坏了
com.aliyun.oss.ClientException: Connection error due to: Connection pool shut down