| | |
| | | } |
| | | |
| | | |
| | | // public static void main(String[] args) throws Exception { |
| | | // //ftp服务器IP地址 |
| | | // String ftpHost = "192.168.0.105"; |
| | | // //ftp服务器端口 |
| | | // int ftpPort = 21; |
| | | // //ftp服务器用户名 |
| | | // String ftpUserName = "yly"; |
| | | // //ftp服务器密码 |
| | | // String ftpPassword = "Yly@123"; |
| | | // //ftp服务器路径 |
| | | // String ftpPath = "anbao/sql.json"; |
| | | // //本地路径 |
| | | // String localPath = "D:\\anbao"; |
| | | // //文件名 |
| | | // String fileName = "sql.json"; |
| | | //// FtpUtil.downloadFtpFile(ftpHost, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName); |
| | | // String s = OutJson.TestJson(); |
| | | // System.out.println(s); |
| | | // //boolean ftpFileExist = FtpUtil.isFTPFileExist(ftpPath, ftpUserName, ftpPassword, ftpHost, ftpPort); |
| | | // //System.out.println(ftpFileExist); |
| | | // } |
| | | public static void main(String[] args) throws Exception { |
| | | //ftp服务器IP地址 |
| | | String ftpHost = "192.168.0.105"; |
| | | //ftp服务器端口 |
| | | int ftpPort = 21; |
| | | //ftp服务器用户名 |
| | | String ftpUserName = "yly"; |
| | | //ftp服务器密码 |
| | | String ftpPassword = "Yly@123"; |
| | | //ftp服务器路径 |
| | | String ftpPath = "anbao/sql.json"; |
| | | //本地路径 |
| | | String localPath = "D:\\anbao"; |
| | | //文件名 |
| | | String fileName = "sql.json"; |
| | | // FtpUtil.downloadFtpFile(ftpHost, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName); |
| | | String s = OutJson.TestJson(); |
| | | String sql = OutJson.stringReplace(s); |
| | | System.out.println(sql); |
| | | //boolean ftpFileExist = FtpUtil.isFTPFileExist(ftpPath, ftpUserName, ftpPassword, ftpHost, ftpPort); |
| | | //System.out.println(ftpFileExist); |
| | | } |
| | | |
| | | |
| | | |