src/main/java/org/springblade/common/constant/FtpConstant.java
@@ -8,7 +8,7 @@ /** * sql connect */ String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbawy?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbawy?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; /** * sql connect @@ -18,7 +18,7 @@ /** * ftp服务器IP地址 */ String ftpHost_dev = "192.168.0.199"; String ftpHost_dev = "172.19.1.30"; /** * ftp服务器IP地址 @@ -34,13 +34,13 @@ * ftp服务器用户名 */ //String ftpUserName = "yly"; String ftpUserName = "arsn"; String ftpUserName = "yly"; /** * ftp服务器密码 */ //String ftpPassword = "Yly@123"; String ftpPassword = "123456"; String ftpPassword = "Yly@123"; /** src/main/java/org/springblade/modules/FTP/FtpUtil.java
@@ -295,17 +295,17 @@ * @param s1 sql */ public static void sqlFileUpload(String s1){ String json1 = JSON.toJSONString(s1); String response1 = String.valueOf((new Date()).getTime()); OutJson.createJsonFile(json1, localPath, "w"+response1); FileInputStream in1 = null; try { in1 = new FileInputStream(new File(localPath + "w"+response1+".json")); } catch (FileNotFoundException e) { e.printStackTrace(); } FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "w"+response1+".json", in1); MysqlCenlint.deletess("w"+response1+".json"); // String json1 = JSON.toJSONString(s1); // String response1 = String.valueOf((new Date()).getTime()); // OutJson.createJsonFile(json1, localPath, "w"+response1); // FileInputStream in1 = null; // try { // in1 = new FileInputStream(new File(localPath + "w"+response1+".json")); // } catch (FileNotFoundException e) { // e.printStackTrace(); // } // FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "w"+response1+".json", in1); // MysqlCenlint.deletess("w"+response1+".json"); } }