new Date() 更改成 System.currentTimeMillis()

This commit is contained in:
xudawei 2024-05-27 16:48:32 +08:00
parent 7e3f45fd6a
commit 45f4ceda0f

View File

@ -314,7 +314,7 @@ public class AliOssServiceImpl implements AliOssService {
@Override
public String uploadSignUrl(String bucketName, String key, String fileName, Long expireSecond) {
// 指定生成的签名URL过期时间单位为毫秒
Date expiration = new Date(new Date().getTime() + expireSecond * 1000L);
Date expiration = new Date(System.currentTimeMillis() + expireSecond * 1000L);
// 设置用户自定义元数据
Map<String, String> metadata = new HashMap<String, String>();