|
|
@@ -16,18 +16,18 @@ public class OSSClientUtil {
|
|
|
/**
|
|
|
* 通过阿里云OSSClient客户端读取指定objectKey的文件流,利用Jackson将文件流反序列化成List<T>类型的数据模型并返回。
|
|
|
*
|
|
|
- * @param aliyunProperties 用于配置阿里云OSS客户端的属性对象。
|
|
|
- * @param objectKey 阿里云OSS存储桶中的文件对象的唯一标识符。
|
|
|
- * @param clazz 要反序列化的目标类型。
|
|
|
+ * @param properties 用于配置阿里云OSS客户端的属性对象。
|
|
|
+ * @param objectKey 阿里云OSS存储桶中的文件对象的唯一标识符。
|
|
|
+ * @param clazz 要反序列化的目标类型。
|
|
|
* @return 返回反序列化后的List<T>类型数据模型。
|
|
|
* @throws IOException 当出现IO异常时,抛出IOException。
|
|
|
*/
|
|
|
- public static <T> List<T> getDataModel(AliyunProperties aliyunProperties, String objectKey, Class<T> clazz) throws IOException {
|
|
|
+ public static <T> List<T> getDataModel(AliyunProperties properties, String objectKey, Class<T> clazz) throws IOException {
|
|
|
// 从阿里云OSS客户端配置对象中获取必要的参数
|
|
|
- String endpoint = aliyunProperties.getOssEndPoint();
|
|
|
- String accessKeyId = aliyunProperties.getAccessKeyId();
|
|
|
- String accessKeySecret = aliyunProperties.getAccessKeySecret();
|
|
|
- String bucketName = aliyunProperties.getOssBucketName();
|
|
|
+ String endpoint = properties.getOssEndPoint();
|
|
|
+ String accessKeyId = properties.getAccessKeyId();
|
|
|
+ String accessKeySecret = properties.getAccessKeySecret();
|
|
|
+ String bucketName = properties.getOssBucketName();
|
|
|
// 创建OSS客户端
|
|
|
OSSClient client = new OSSClient(endpoint, accessKeyId, accessKeySecret);
|
|
|
List<T> list;
|