From fc4e99450056ed655a4162278e52fe6859710194 Mon Sep 17 00:00:00 2001 From: orgin Date: Tue, 4 Jul 2023 14:19:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=A7=A3=E5=86=B3ftp=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=88=90=E5=8A=9F=E4=B9=8B=E5=90=8E=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=96=87=E4=BB=B6=E5=88=97=E8=A1=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/jeecg/common/util/FTPUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java index c40d9edb..62a8b729 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java @@ -47,12 +47,12 @@ public class FTPUtil { //声明FTP客户端 FTPClient ftp = new FTPClient(); try { - // 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单 - ftp.enterLocalPassiveMode(); //连接 ftp.connect(host, port); //登录 ftp.login(userName, password); + // 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单 + ftp.enterLocalPassiveMode(); //判断是否连接成功 int reply = ftp.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) {