智慧保安后台管理-外网
Administrator
2022-05-23 4566a255edffe93cca71eb74e28debd30c87917b
src/main/java/org/springblade/modules/quartz/task/Task.java
@@ -62,9 +62,15 @@
//   @Scheduled(cron = "*/30 * * * * ?")
   public boolean readFile() {
      FTPClient ftp = new FTPClient();
      System.out.println("ftp 创建客户端");
      try {
         //设置传输超时时间为60秒
         ftp.setDataTimeout(60000);
         //连接超时为60秒
         ftp.setConnectTimeout(60000);
         //连接
         ftp.connect(ftpHost, ftpPort);
         System.out.println("ftp 连接成功!");
         // 登陆
         ftp.login(ftpUserNameIn, ftpPasswordIn);
         // 检验登陆操作的返回码是否正确
@@ -140,7 +146,7 @@
         System.out.println("ftp连接失败");
         e.printStackTrace();
      } finally {
         if (ftp != null) {
         if (ftp.isConnected()) {
            try {
               ftp.disconnect();
            } catch (IOException e) {