|
@@ -114,13 +114,14 @@ public class ManJob {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Scheduled(cron = "0 0/1 * * * ?", zone = "Asia/Shanghai")
|
|
|
- private void downloadFile() {
|
|
|
- try {
|
|
|
- SFTPUtil.download(userName, port, host, passphrase, keyFilePath, fileDir, manDownloadPath);
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("下载文件失败,失败原因:{}", e.getMessage());
|
|
|
- }
|
|
|
- }
|
|
|
+ // 手动创建连接,远程sftp文件下载,使用路由替代此方法
|
|
|
+// @Scheduled(cron = "0 0/1 * * * ?", zone = "Asia/Shanghai")
|
|
|
+// private void downloadFile() {
|
|
|
+// try {
|
|
|
+// SFTPUtil.download(userName, port, host, passphrase, keyFilePath, fileDir, manDownloadPath);
|
|
|
+// } catch (Exception e) {
|
|
|
+// log.error("下载文件失败,失败原因:{}", e.getMessage());
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
}
|