FTP实时传输引擎
FTP实时传输引擎:scala+springboot+mysql+redis+docker, 通过技术实现服务器对服务器的点对点的传输
FTP实时传输引擎:scala+springboot+mysql+redis+docker, 通过技术实现服务器对服务器的点对点的传输
展示部分代码: @Component public class OSS { //url https://waterchat.oss-cn-beijing.aliyuncs.com/on public static final String endpoint = "http://oss-cn-hangzhou.aliyuncs.com"; // 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录 https://ram.console.aliyun.com 创建RAM账号。 public static final String accessKeyId = "xxxxxxxxxxx"; public static final String accessKeySecret = "xxxxxxx"; //传一个文件过来,返回uuid+日期+秒 public String up(MultipartFile mFile) throws IOException { //生成专有文件名 SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); String dateDir = sdf.format(new Date()); String name= dateDir+UUID.randomUUID().toString(); String destfileName=""; String baseDir=""; String absolutePath=""; //存 try {
JSONObject对象依赖的6个jar包,非常重要日包,可以解析Response响应日JSON JSONObject json = JSONObject.fromObject(Response);