洪城义警-正式版后台
zhongrj
2022-12-06 bd2d5cd6e072825433ce6126f08e4b0991fe9c0d
ftp 测试配置修改
4 files modified
38 ■■■■■ changed files
src/main/java/org/springblade/common/config/FtpConfig.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/FTP/FtpUtil.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/FTP/monitor.java 3 ●●●● patch | view | raw | blame | history
src/main/resources/application-test.yml 30 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/FtpConfig.java
@@ -51,8 +51,6 @@
     */
    public static String ftpFilePath;
    /**
     * 本地路径
     */
src/main/java/org/springblade/modules/FTP/FtpUtil.java
@@ -98,7 +98,6 @@
            //OutputStream os = new FileOutputStream(localFile);
            //ftpClient.retrieveFile(fileName, os); os.close();
            // 第二种方式下载:将输入流转成字节,再生成文件,这种方式方便将字节数组直接返回给前台jsp页面
            byte[] input2byte = input2byte(retrieveFileStream);
            byte2File(input2byte, localPath, fileName);
@@ -144,7 +143,7 @@
                return result;
            }
            // 切换到上传目录
            if (!ftpClient.changeWorkingDirectory(basePath + filePath)) {
            if (!ftpClient.changeWorkingDirectory(basePath +"/"+ filePath)) {
                // 如果目录不存在创建目录
                String[] dirs = filePath.split("/");
                String tempPath = "";
src/main/java/org/springblade/modules/FTP/monitor.java
@@ -41,8 +41,7 @@
            if (files.length==0){
                return false;
            }
            else {
            } else {
                for (FTPFile file : files){
                    fileName = file.getName();
                    InputStream is = ftp.retrieveFileStream(new String(fileName.getBytes("GBK"), FTP.DEFAULT_CONTROL_ENCODING));
src/main/resources/application-test.yml
@@ -29,9 +29,9 @@
    #      username: root
    #      password: ZHba@0112
    url: jdbc:mysql://106.225.193.35:3306/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
    url: jdbc:mysql://192.168.0.126:3306/hcyj?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
    username: root
    password: HCyj@2022
    password: NCzhba@2022
    # PostgreSQL
@@ -50,24 +50,24 @@
#ftp 设置
ftp:
  sqlConnect: jdbc:mysql://106.225.193.35:3306/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
  ftpHost: 192.168.0.198
#  ftpHost: 192.168.0.198
#  ftpPort: 21
#  ftpUserName: arsn
#  ftpPassword: 123456
#  ftpBasePath: anbao
#  ftpFilePath: qfqk
#  localPath: D:\\anbao\\
#  ip: http://47.49.21.216:9000
#  jsonUrl: D:\\anbao\\
  ftpHost: 117.40.91.118
  ftpPort: 21
  ftpUserName: arsn
  ftpPassword: 123456
  ftpBasePath: anbao
  ftpUserName: zhbain
  ftpPassword: zhbain@123
  ftpBasePath: yly
  ftpFilePath: qfqk
  localPath: D:\\anbao\\
  ip: http://47.49.21.216:9000
  jsonUrl: D:\\anbao\\
#  ftpHost: 117.40.91.118
#  ftpPort: 21
#  ftpUserName: zhbain
#  ftpPassword: zhbain@123
#  ftpBasePath: yly
#  ftpFilePath: qfqk
#  localPath: /home/zhongsong/qfqk/
#  ip: http://47.49.21.216:9000
#  jsonUrl: /home/zhongsong/qfqk/
#第三方登陆
social: