http工具修改
parent
222e998b6c
commit
8d8375bded
|
@ -1034,12 +1034,12 @@ public class HttpUtils {
|
|||
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
|
||||
Long totalSize = 0L;
|
||||
for (MultipartFile multipartFile : multipartFileList) {
|
||||
log.info(Util.logStr("add file, file info: fileName => [{}], fileKey => [{}], fileSize => [{}]kb",
|
||||
log.info(Util.logStr("add file: fileName => [{}], fileKey => [{}], fileSize => [{}]kb",
|
||||
multipartFile.getFileName(), multipartFile.getFileKey(), multipartFile.getFileSize()));
|
||||
totalSize += multipartFile.getFileSize();
|
||||
builder.addBinaryBody(multipartFile.getFileKey(), multipartFile.getStream(), ContentType.MULTIPART_FORM_DATA, multipartFile.getFileName());
|
||||
}
|
||||
log.info("total file size: [" + totalSize + "]");
|
||||
log.info("total file size: [" + totalSize + "]kb");
|
||||
ContentType contentType = ContentType.create("text/plain", StandardCharsets.UTF_8);
|
||||
for (Map.Entry<String, Object> param : params.entrySet()) {
|
||||
StringBody stringBody = new StringBody(String.valueOf(param.getValue()), contentType);
|
||||
|
@ -1083,12 +1083,12 @@ public class HttpUtils {
|
|||
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
|
||||
Long totalSize = 0L;
|
||||
for (MultipartFile multipartFile : multipartFileList) {
|
||||
log.info(Util.logStr("add file, file info: fileName => [{}], fileKey => [{}], fileSize => [{}]kb",
|
||||
log.info(Util.logStr("add file: fileName => [{}], fileKey => [{}], fileSize => [{}]kb",
|
||||
multipartFile.getFileName(), multipartFile.getFileKey(), multipartFile.getFileSize()));
|
||||
totalSize += multipartFile.getFileSize();
|
||||
builder.addBinaryBody(multipartFile.getFileKey(), multipartFile.getStream(), ContentType.MULTIPART_FORM_DATA, multipartFile.getFileName());
|
||||
}
|
||||
log.info("total file size: [" + totalSize + "]");
|
||||
log.info("total file size: [" + totalSize + "]kb");
|
||||
ContentType contentType = ContentType.create("text/plain", StandardCharsets.UTF_8);
|
||||
for (Map.Entry<String, Object> param : params.entrySet()) {
|
||||
StringBody stringBody = new StringBody(String.valueOf(param.getValue()), contentType);
|
||||
|
|
|
@ -2,7 +2,6 @@ package youhong.ai.pcn;
|
|||
|
||||
import ebu7common.youhong.ai.sftp.SftpConnectUtil;
|
||||
import baseTest.BaseTest;
|
||||
import com.jcraft.jsch.ChannelSftp;
|
||||
import org.junit.Test;
|
||||
import weaver.general.GCONST;
|
||||
import weaver.youhong.ai.pcn.hrorganization.sftp.FetchDataUtil;
|
||||
|
|
Loading…
Reference in New Issue