mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 11:58:01 +08:00
阿里云 oss
This commit is contained in:
parent
1f357b4707
commit
b3bfec6a46
@ -22,10 +22,9 @@ public class OssManager {
|
||||
OSSClient ossClient = getOSSClient();
|
||||
String prefix = String.format("%s%s", getKeyPrefix(), name);
|
||||
ObjectListing objectListing = ossClient.listObjects(getBucketName(), prefix);
|
||||
|
||||
List<OSSObjectSummary> sums = objectListing.getObjectSummaries();
|
||||
for (OSSObjectSummary s : sums) {
|
||||
System.out.println(JSONObject.toJSON(s));
|
||||
// System.out.println(DateUtil.date(s.getLastModified()));
|
||||
System.out.println("\t" + s.getKey());
|
||||
}
|
||||
// 关闭OSSClient。
|
||||
|
Loading…
Reference in New Issue
Block a user