| | |
| | | //private static String fileName = "nsql.json"; |
| | | |
| | | |
| | | @Scheduled(cron = "*/30 * * * * ?") |
| | | // @Scheduled(cron = "*/30 * * * * ?") |
| | | public static boolean isFTPFileExist() { |
| | | |
| | | FTPClient ftp = new FTPClient(); |
| | |
| | | |
| | | ftp.login(ftpUserName, ftpPassword); |
| | | |
| | | System.out.println("ftp.getReplyCode() = " + ftp.getReplyCode()); |
| | | // System.out.println("ftp.getReplyCode() = " + ftp.getReplyCode()); |
| | | |
| | | // 检验登陆操作的返回码是否正确 |
| | | if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) { |
| | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | //MysqlCenlint.deletess(fileName); |
| | | //FtpUtil.deleteFile(ftpHost, ftpPort, ftpUserName, ftpPassword, "anbao/", fileName); |
| | | MysqlCenlint.deletess(fileName); |
| | | FtpUtil.deleteFile(ftpHost, ftpPort, ftpUserName, ftpPassword, "anbao/", fileName); |
| | | e.printStackTrace(); |
| | | |
| | | } finally { |