|
@@ -1,5 +1,6 @@
|
|
|
package com.gis.oss.util;
|
|
|
|
|
|
+import cn.hutool.core.util.RuntimeUtil;
|
|
|
import com.amazonaws.auth.AWSStaticCredentialsProvider;
|
|
|
import com.amazonaws.auth.BasicAWSCredentials;
|
|
|
import com.amazonaws.regions.Regions;
|
|
@@ -161,7 +162,9 @@ public class AwsOssUtil {
|
|
|
|
|
|
public void uploadBySh(String filePath, String key) {
|
|
|
String cmd = String.format(CmdConstant.UPLOAD_DIR, bucket, filePath, key , "aws");
|
|
|
- CmdUtils.callShell(cmd);
|
|
|
+ // CmdUtils.callShell(cmd);
|
|
|
+ log.info("cmd aws: {}", cmd);
|
|
|
+ RuntimeUtil.exec(new String[]{"/bin/sh", "-c"}, cmd);
|
|
|
// CmdUtils.callLine(cmd);
|
|
|
}
|
|
|
}
|