feat():测试
parent
e2aaabba6f
commit
b60abb6ce1
|
@ -4,6 +4,8 @@ import com.aliyun.oss.OSSClient;
|
|||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.compile.FilesCompilerLoad;
|
||||
import com.muyu.constant.MethodSuffix;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
|
@ -27,6 +29,7 @@ public class OSSFileLoad {
|
|||
// OSS文件路径
|
||||
private static final String fileJavaPath = "build/version/java/";
|
||||
private static final String fileClassPath = "build/version/class/";
|
||||
private static final Logger log = LoggerFactory.getLogger(OSSFileLoad.class);
|
||||
|
||||
public static Result<Object> streamingDownload(String fileName) throws IOException {
|
||||
String source = null;
|
||||
|
@ -109,6 +112,7 @@ public class OSSFileLoad {
|
|||
String localPath = "home/class/" + fileName ;
|
||||
|
||||
try {
|
||||
log.info("执行下载class文件:[{}]",localPath);
|
||||
// 从OSS下载文件
|
||||
InputStream inputStream = ossClient.getObject(bucketName, fileClassPath + fileName ).getObjectContent();
|
||||
File downloadFile = new File(localPath);
|
||||
|
|
Loading…
Reference in New Issue