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

浙公网安备 33010602011771号