|
@@ -68,12 +68,12 @@ public class XmlUtil implements InitializingBean {
|
|
if (!file.exists()) {
|
|
if (!file.exists()) {
|
|
boolean flag = file.mkdirs();
|
|
boolean flag = file.mkdirs();
|
|
}
|
|
}
|
|
-
|
|
|
|
- FileInputStream fileInputStream = new FileInputStream(file.getAbsoluteFile());
|
|
|
|
-
|
|
|
|
- MultipartFile multipartFile = new MockMultipartFile(ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
|
|
|
/** 将document中的内容写入文件中 */
|
|
/** 将document中的内容写入文件中 */
|
|
XMLWriter writer = new XMLWriter(new FileWriter(file), format);
|
|
XMLWriter writer = new XMLWriter(new FileWriter(file), format);
|
|
|
|
+ Path path = FileSystems.getDefault().getPath(file.getAbsoluteFile().getPath());
|
|
|
|
+ FileInputStream fileInputStream = new FileInputStream(String.valueOf(path));
|
|
|
|
+
|
|
|
|
+ MultipartFile multipartFile = new MockMultipartFile(ContentType.APPLICATION_OCTET_STREAM.toString(), fileInputStream);
|
|
writer.write(document);
|
|
writer.write(document);
|
|
writer.close();
|
|
writer.close();
|
|
String returnFile = upload(multipartFile, name);
|
|
String returnFile = upload(multipartFile, name);
|