1,aws sdk jar版本不一致问题
一开始我在pom.xml中只配置了如下aws-java-sdk-s3
com.amazonaws
aws-java-sdk-s3
1.11.506
然后eclipse工程中如下截图,可以看到这3个jar版本不一致
然后我直接执行下面的代码put 字符串和上传文件
1 packagecom.hp.nova.common.tasksync.awss3;2
3 importjava.io.File;4 importjava.io.IOException;5
6 importcom.amazonaws.AmazonServiceException;7 importcom.amazonaws.SdkClientException;8 importcom.amazonaws.auth.AWSCredentials;9 importcom.amazonaws.auth.AWSStaticCredentialsProvider;10 importcom.amazonaws.auth.BasicAWSCredentials;11 importcom.amazonaws.auth.profile.ProfileCredentialsProvider;12 importcom.amazonaws.services.s3.AmazonS3;13 importcom.amazonaws.services.s3.AmazonS3ClientBuilder;14 importcom.amazonaws.services.s3.model.ObjectMetadata;15 importcom