18 files modified
1 files added
| New file |
| | |
| | | package org.springblade.common.config; |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * ftp 配置路径 |
| | | * @author zhongrj |
| | | * @since 2021-9-24 |
| | | */ |
| | | @ConfigurationProperties(prefix = "ftp") |
| | | @Component |
| | | public class FtpConfig { |
| | | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | public static String sqlConnect; |
| | | |
| | | |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | public static String ftpHost; |
| | | |
| | | |
| | | /** |
| | | * ftp服务器端口 |
| | | */ |
| | | public static int ftpPort; |
| | | |
| | | /** |
| | | * ftp服务器用户名 |
| | | */ |
| | | public static String ftpUserName; |
| | | |
| | | /** |
| | | * ftp服务器密码 |
| | | */ |
| | | public static String ftpPassword; |
| | | |
| | | |
| | | /** |
| | | * ftp服务器路径 |
| | | */ |
| | | public static String ftpPath; |
| | | |
| | | /** |
| | | * 本地路径 |
| | | */ |
| | | public static String localPath; |
| | | |
| | | |
| | | /** |
| | | * minio内网ip |
| | | */ |
| | | public static String ip; |
| | | |
| | | |
| | | public static String jsonUrl; |
| | | |
| | | |
| | | public void setSqlConnect(String sqlConnect) { |
| | | FtpConfig.sqlConnect = sqlConnect; |
| | | } |
| | | |
| | | public void setFtpHost(String ftpHost) { |
| | | FtpConfig.ftpHost = ftpHost; |
| | | } |
| | | |
| | | public void setFtpPort(int ftpPort) { |
| | | FtpConfig.ftpPort = ftpPort; |
| | | } |
| | | |
| | | public void setFtpUserName(String ftpUserName) { |
| | | FtpConfig.ftpUserName = ftpUserName; |
| | | } |
| | | |
| | | public void setFtpPassword(String ftpPassword) { |
| | | FtpConfig.ftpPassword = ftpPassword; |
| | | } |
| | | |
| | | public void setFtpPath(String ftpPath) { |
| | | FtpConfig.ftpPath = ftpPath; |
| | | } |
| | | |
| | | public void setLocalPath(String localPath) { |
| | | FtpConfig.localPath = localPath; |
| | | } |
| | | |
| | | public void setIp(String ip) { |
| | | FtpConfig.ip = ip; |
| | | } |
| | | } |
| | |
| | | package org.springblade.common.constant; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | | */ |
| | | public interface FtpConstant { |
| | | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | //String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | // String ftpHost_dev = "192.168.0.112"; |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | String ftpHost_dev = "172.19.1.30"; |
| | | |
| | | /** |
| | | * ftp服务器端口 |
| | | */ |
| | | int ftpPort = 21; |
| | | |
| | | /** |
| | | * ftp服务器用户名 |
| | | */ |
| | | String ftpUserName = "yly"; |
| | | // String ftpUserName = "anonymous"; |
| | | |
| | | /** |
| | | * ftp服务器密码 |
| | | */ |
| | | String ftpPassword = "Yly@123"; |
| | | //package org.springblade.common.constant; |
| | | // |
| | | ///** |
| | | // * @author zhongrj |
| | | // */ |
| | | //public interface FtpConstant { |
| | | // |
| | | // /** |
| | | // * sql connect |
| | | // */ |
| | | // String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | // |
| | | // /** |
| | | // * sql connect |
| | | // */ |
| | | //// String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | // |
| | | // /** |
| | | // * ftp服务器IP地址 |
| | | // */ |
| | | // String ftpHost_dev = "192.168.0.199"; |
| | | // |
| | | // /** |
| | | // * ftp服务器IP地址 |
| | | // */ |
| | | //// String ftpHost_dev = "172.19.1.30"; |
| | | // |
| | | // /** |
| | | // * ftp服务器端口 |
| | | // */ |
| | | // int ftpPort = 21; |
| | | // |
| | | // /** |
| | | // * ftp服务器用户名 |
| | | // */ |
| | | //// String ftpUserName = "yly"; |
| | | // String ftpUserName = "arsn"; |
| | | // |
| | | // /** |
| | | // * ftp服务器密码 |
| | | // */ |
| | | //// String ftpPassword = "Yly@123"; |
| | | // String ftpPassword = ""; |
| | | |
| | | |
| | | /** |
| | | * ftp服务器路径 |
| | | */ |
| | | String ftpPath = "yly/anbao/"; |
| | | // |
| | | // |
| | | // /** |
| | | // * ftp服务器路径 |
| | | // */ |
| | | //// String ftpPath = "yly/anbao/"; |
| | | // String ftpPath = "anbao/"; |
| | | |
| | | /** |
| | | * 本地路径 |
| | | */ |
| | | String localPath = "/home/zhongsong/anbao/"; |
| | | // |
| | | // /** |
| | | // * 本地路径 |
| | | // */ |
| | | //// String localPath = "/home/zhongsong/anbao/"; |
| | | // String localPath = "D:\\anbao\\"; |
| | | |
| | | |
| | | //minio内网ip |
| | | String ip = "http://47.49.21.216:9000"; |
| | | // |
| | | // |
| | | // //minio内网ip |
| | | //// String ip = "http://47.49.21.216:9000"; |
| | | // String ip = "http://223.82.109.183:2081"; |
| | | |
| | | String jsonUrl = "/home/zhongsong/anbao/"; |
| | | // |
| | | //// String jsonUrl = "/home/zhongsong/anbao/"; |
| | | // String jsonUrl = "D:\\anbao\\"; |
| | | } |
| | | //} |
| | |
| | | import org.apache.commons.net.ftp.FTP; |
| | | import org.apache.commons.net.ftp.FTPClient; |
| | | import org.apache.commons.net.ftp.FTPReply; |
| | | |
| | | import java.io.*; |
| | | import java.net.SocketException; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | import static org.springblade.common.constant.FtpConstant.ftpPassword; |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | /** |
| | | * ftp工具类 |
| | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "w"+response1+".json", in1); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "w"+response1+".json", in1); |
| | | MysqlCenlint.deletess("w"+response1+".json"); |
| | | } |
| | | |
| | |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.SQLException; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.localPath; |
| | | import static org.springblade.common.constant.FtpConstant.sql_connect_dev; |
| | | import static org.springblade.common.config.FtpConfig.localPath; |
| | | import static org.springblade.common.config.FtpConfig.sqlConnect; |
| | | |
| | | |
| | | public class MysqlCenlint { |
| | | |
| | |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.jdbc.Driver"; |
| | | String url = sql_connect_dev; //换成要连接的数据库信息 |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = "root"; |
| | | String password = "zhba0728"; |
| | | Class.forName ( driver ); |
| | |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.jdbc.Driver"; |
| | | String url = sql_connect_dev; //换成要连接的数据库信息 |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = "root"; |
| | | String password = "zhba0728"; |
| | | Class.forName ( driver ); |
| | |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.jdbc.Driver"; |
| | | String url = sql_connect_dev; //换成要连接的数据库信息 |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = "root"; |
| | | String password = "zhba0728"; |
| | | Class.forName ( driver ); |
| | |
| | | package org.springblade.modules.FTP; |
| | | |
| | | import org.springblade.common.constant.FtpConstant; |
| | | |
| | | import org.springblade.common.config.FtpConfig; |
| | | |
| | | import java.io.*; |
| | | |
| | |
| | | */ |
| | | public static String TestJson(String fileName){ |
| | | //File file = new File(FtpConstant.jsonUrl+fileName); |
| | | File file = new File(FtpConstant.jsonUrl +fileName); |
| | | File file = new File(FtpConfig.jsonUrl +fileName); |
| | | StringBuilder localStrBulider = new StringBuilder(); |
| | | if(file.isFile() && file.exists()) { |
| | | try { |
| | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | |
| | | @Component |
| | | public class monitor { |
| | |
| | | try { |
| | | |
| | | // 连接ftp服务器 |
| | | // System.out.println("ftpHost = " + ftpHost); |
| | | |
| | | ftp.connect(ftpHost_dev, ftpPort); |
| | | ftp.connect(ftpHost, ftpPort); |
| | | |
| | | // 登陆 |
| | | |
| | |
| | | String substring1 = fileName.substring(0, 1); |
| | | if (substring1.equals("n")){ |
| | | //把文件下载到本地 |
| | | FtpUtil.downloadFtpFile(ftpHost_dev, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName); |
| | | FtpUtil.downloadFtpFile(ftpHost, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName); |
| | | // |
| | | String s = OutJson.TestJson(fileName); |
| | | //sql语句 |
| | |
| | | //删除本地文件 |
| | | //MysqlCenlint.deletes(fileName); |
| | | MysqlCenlint.deletess(fileName); |
| | | FtpUtil.deleteFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, fileName); |
| | | FtpUtil.deleteFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, fileName); |
| | | is.close(); |
| | | ftp.completePendingCommand(); |
| | | } |
| | |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "f"+response1+".json", in1); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "f"+response1+".json", in1); |
| | | return "成功"; |
| | | } |
| | | |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | |
| | | /** |
| | | * 考试报名服务实现类 |
| | | * @author zhongrj |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | String[] split = coinspect.getUrl().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | url += FtpConstant.ip + s + ","; |
| | | url += FtpConfig.ip + s + ","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | coinspect.setUrl(substring); |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | String[] directiveUrl = directive.getUrl().split(","); |
| | | for (String url : directiveUrl) { |
| | | String s = url.substring(26, url.length()); |
| | | String urls = FtpConstant.ip + s; |
| | | String urls = FtpConfig.ip + s; |
| | | DirectiveFile directiveFile = new DirectiveFile(); |
| | | directiveFile.setType(1); |
| | | directiveFile.setDirectiveId(directive.getId()); |
| | |
| | | String[] directiveUrl = directive.getUrl().split(","); |
| | | for (String url : directiveUrl) { |
| | | String s = url.substring(26, url.length()); |
| | | String urls = FtpConstant.ip + s; |
| | | String urls = FtpConfig.ip + s; |
| | | DirectiveFile directiveFile = new DirectiveFile(); |
| | | directiveFile.setType(1); |
| | | directiveFile.setDirectiveId(directive.getId()); |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import com.alibaba.fastjson.JSON; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | |
| | | String format = ""; |
| | | if (information.getBusinessLicense() != null && !"".equals(information.getBusinessLicense())) { |
| | | businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length()); |
| | | businessLicenses = FtpConstant.ip + businessLicense; |
| | | businessLicenses = FtpConfig.ip + businessLicense; |
| | | } else { |
| | | businessLicenses = ""; |
| | | } |
| | | if (information.getLicence() != null && !"".equals(information.getLicence())) { |
| | | licence = information.getLicence().substring(26, information.getLicence().length()); |
| | | licences = FtpConstant.ip + licence; |
| | | licences = FtpConfig.ip + licence; |
| | | } else { |
| | | licences = ""; |
| | | } |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | String[] splits = split[i].split("/"); |
| | | url += FtpConstant.ip +"/zhba/upload/picture/"+ splits[6] + ","; |
| | | url += FtpConfig.ip +"/zhba/upload/picture/"+ splits[6] + ","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | licetuser.setLinks(substring); |
| | |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | String[] splits = split[i].split("/"); |
| | | url += FtpConstant.ip +"/zhba/upload/picture/"+ splits[6] + ","; |
| | | url += FtpConfig.ip +"/zhba/upload/picture/"+ splits[6] + ","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | licetuser.setLinks(substring); |
| | |
| | | import io.minio.*; |
| | | import io.minio.errors.*; |
| | | import io.swagger.annotations.Api; |
| | | import javafx.scene.Parent; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.SneakyThrows; |
| | | import org.springblade.common.config.FileConfig; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.utils.FileUtil; |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.oss.model.BladeFile; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | /** |
| | | * 对象存储端点 |
| | |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | return R.data(urls); |
| | |
| | | .headers(headers) |
| | | .build()); |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //数据封装 |
| | |
| | | |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //内网 |
| | | String inUrl = ip + "/zhba/" + newName; |
| | | String inUrl = FtpConfig.ip + "/zhba/" + newName; |
| | | //取出身份证号,查询用户信息,更新用户信息 |
| | | String pictrueName = multipartFile.getName().substring(0, multipartFile.getName().lastIndexOf(".")); |
| | | // String regex ="([1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3})"; |
| | |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | } |
| | | } |
| | |
| | | |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //内网 |
| | | String inUrl = ip +"/zhba/"+ newName; |
| | | String inUrl = FtpConfig.ip +"/zhba/"+ newName; |
| | | //取出身份证号,查询用户信息,更新用户信息 |
| | | String pictrueName = multipartFile.getName().substring(0, multipartFile.getName().lastIndexOf(".")); |
| | | // String regex ="([1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3})"; |
| | |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | } |
| | | } |
| | |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = file.getInputStream(); |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream); |
| | | in.close(); |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | //数据封装 |
| | |
| | | } |
| | | attachService.save(attach); |
| | | String[] split = bladeFile.getName().split("/"); |
| | | String ip = FtpConstant.ip+"/zhba/upload/picture/"; |
| | | String ip = FtpConfig.ip+"/zhba/upload/picture/"; |
| | | String imgurl = ip + split[2]; |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in); |
| | | FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], in); |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," + |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | |
| | | String[] split = seinspect.getUrl().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | url += FtpConstant.ip + s + ","; |
| | | url += FtpConfig.ip + s + ","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | seinspect.setUrl(substring); |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | |
| | | String[] split = user.getAvatar().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | urla += FtpConstant.ip + s + ","; |
| | | urla += FtpConfig.ip + s + ","; |
| | | } |
| | | String substring = urla.substring(0, urla.length() - 1); |
| | | user.setAvatar(substring); |
| | |
| | | String[] splits = user.getFingerprint().split(","); |
| | | for (int i = 0; i < splits.length; i++) { |
| | | String s = splits[i].substring(26, splits[i].length()); |
| | | urlf += FtpConstant.ip + s + ","; |
| | | urlf += FtpConfig.ip + s + ","; |
| | | } |
| | | String substrings = urla.substring(0, urlf.length() - 1); |
| | | user.setFingerprint(substrings); |
| | |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.common.constant.FtpConstant; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | String[] split = talk.getImgurl().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | url += FtpConstant.ip + s + ","; |
| | | url += FtpConfig.ip + s + ","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | talk.setImgurl(substring); |
| | |
| | | String[] split = talk.getImgurl().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | | String s = split[i].substring(26, split[i].length()); |
| | | url += FtpConstant.ip + s + ","; |
| | | url += FtpConfig.ip + s + ","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | talk.setImgurl(substring); |
| | |
| | | username: root |
| | | password: zhba0728 |
| | | |
| | | # url: jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | # username: root |
| | | # password: zhba0728 |
| | | |
| | | # PostgreSQL |
| | | #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot |
| | | #username: postgres |
| | |
| | | #图片批量上传zip |
| | | upload: |
| | | localtion: ${UPLOAD_DIR:/home/zhongsong/anbao} |
| | | # localtion: ${UPLOAD_DIR:D:/test} |
| | | maxFileSize: 10240KB |
| | | maxRequestSize: 102400KB |
| | | |
| | | #ftp 设置 |
| | | ftp: |
| | | sqlConnect: jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | ftpHost: 172.19.1.30 |
| | | ftpPort: 21 |
| | | ftpUserName: yly |
| | | ftpPassword: Yly@123 |
| | | ftpPath: yly/anbao/ |
| | | localPath: /home/zhongsong/anbao/ |
| | | ip: http://47.49.21.216:9000 |
| | | jsonUrl: /home/zhongsong/anbao/ |
| | | |
| | | #第三方登陆 |
| | | social: |
| | | enabled: true |
| | |
| | | spring: |
| | | redis: |
| | | ##redis 单机环境配置 |
| | | ##将docker脚本部署的redis服务映射为宿主机ip |
| | | ##生产环境推荐使用阿里云高可用redis服务并设置密码 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: |
| | |
| | | # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 |
| | | # commandTimeout: 5000 |
| | | datasource: |
| | | url: jdbc:mysql://localhost:3306/bladex_boot?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | # MySql |
| | | url: jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: root |
| | | password: zhba0728 |
| | | |
| | | # PostgreSQL |
| | | #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot |
| | | #username: postgres |
| | | #password: 123456 |
| | | # Oracle |
| | | #url: jdbc:oracle:thin:@127.0.0.1:1521:orcl |
| | | #username: BLADEX_BOOT |
| | | #password: BLADEX_BOOT |
| | | # SqlServer |
| | | #url: jdbc:sqlserver://223.82.109.183:1433;DatabaseName=zhbaw |
| | | #username: sa |
| | | #password: zhbaw@2021 |
| | | |
| | | |
| | | #图片批量上传zip |
| | | upload: |
| | | localtion: ${UPLOAD_DIR:D:/test} |
| | | maxFileSize: 10240KB |
| | | maxRequestSize: 102400KB |
| | | |
| | | #ftp 设置 |
| | | ftp: |
| | | sqlConnect: jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | ftpHost: 192.168.0.199 |
| | | ftpPort: 21 |
| | | ftpUserName: arsn |
| | | ftpPassword: |
| | | ftpPath: anbao/ |
| | | localPath: D:\anbao\ |
| | | ip: http://223.82.109.183:2081 |
| | | jsonUrl: D:\anbao\ |
| | | |
| | | #第三方登陆 |
| | | social: |
| | |
| | | lock: |
| | | ##是否启用分布式锁 |
| | | enabled: false |
| | | ##将docker脚本部署的redis服务映射为宿主机ip |
| | | ##生产环境推荐使用阿里云高可用redis服务并设置密码 |
| | | ##redis服务地址 |
| | | address: redis://127.0.0.1:6379 |
| | | password: 123456 |
| | | #本地文件上传 |
| | | file: |
| | | remote-mode: true |
| | | upload-domain: http://localhost:8999 |
| | | remote-path: /usr/share/nginx/html |
| | | |
| | | |
| | | |
| | |
| | | buffer-size: 1024 |
| | | # 是否分配的直接内存 |
| | | direct-buffers: true |
| | | |
| | | spring: |
| | | datasource: |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |