04 2020 档案

摘要:搭建FastDfs文件服务器: "搭建FastDfs文件服务器" 1. 导入依赖包 2. FastDfs配置类 3. 在application.yml文件中配置参数 4. 编写FDFS工具类 5. 编写Controller进行测试 阅读全文
posted @ 2020-04-06 21:40 她的开呀 阅读(2847) 评论(0) 推荐(0)
摘要:docker compose.yml 需要注意: network_mode 必须是host, 原因是当上传文件时,tracker会把storage的IP和端口发给client,如果是bridge模式,则发送的是内网IP,client无法访问到。 image采用season/fastdfs:1.2 不 阅读全文
posted @ 2020-04-06 21:15 她的开呀 阅读(5599) 评论(3) 推荐(0)
摘要:```@GetMapping("/download") public void downloadFile(String filePath, HttpServletResponse response) throws IOException { byte[] bytes = fastDfsUtil.downloadFile(filePath); String file... 阅读全文
posted @ 2020-04-06 13:55 她的开呀 阅读(1028) 评论(0) 推荐(0)
摘要:先将对象转为json,再解析成对象即可 阅读全文
posted @ 2020-04-03 22:43 她的开呀 阅读(1613) 评论(0) 推荐(0)
摘要:java中Map对象转为有相同属性的类对象(json作为中间转换) 1. 准备好json转换工具类 2. map转为User对象简单示例 阅读全文
posted @ 2020-04-03 22:33 她的开呀 阅读(1138) 评论(0) 推荐(0)