|
|
@@ -168,7 +168,7 @@ public class FileServiceImpl implements FileService {
|
|
|
FileUtils.create(targetFile.getAbsolutePath(), file.getBytes());
|
|
|
return "成功上传文件至:" + targetFile.getPath();
|
|
|
} catch (IllegalStateException | IOException | ReportException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ logger.error("", e);
|
|
|
return "文件上传失败: " + fileName;
|
|
|
}
|
|
|
}
|
|
|
@@ -197,7 +197,7 @@ public class FileServiceImpl implements FileService {
|
|
|
FileUtils.create(targetFile.getAbsolutePath(), file.getBytes());
|
|
|
stringBuilder.append("成功上传文件至:");
|
|
|
} catch (IllegalStateException | IOException | ReportException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ logger.error("", e);
|
|
|
stringBuilder.append("上传文件失败:");
|
|
|
}
|
|
|
stringBuilder.append(targetFile.getPath()).append("\n");
|
|
|
@@ -285,7 +285,7 @@ public class FileServiceImpl implements FileService {
|
|
|
inputStream.read(data);
|
|
|
inputStream.close();
|
|
|
} catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ logger.error("", e);
|
|
|
}
|
|
|
}
|
|
|
if (ArrayUtils.isEmpty(data)) {
|
|
|
@@ -306,7 +306,7 @@ public class FileServiceImpl implements FileService {
|
|
|
outputStream.flush();
|
|
|
outputStream.close();
|
|
|
} catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ logger.error("", e);
|
|
|
}
|
|
|
}
|
|
|
|