![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
文件上传
怕不是个憨憨
这个作者很懒,什么都没留下…
展开
-
RestTemplate发送文件请求
客户端: public class SendFile { public static void main(String[] args) { RestTemplate restTemplate = new RestTemplate(); SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory(); requestFactory.setBuf原创 2022-03-25 15:15:28 · 1319 阅读 · 0 评论 -
后台接收前端的文件对象-MultipartFile
方式一: 后端代码: @RequestMapping(value="/file/reciveFile",method=RequestMethod.POST) public Result reciveFile(MultipartFile file) throws IOException { //获取文件名 file.getName(); //获取输入流 file.getInputStream(); //获取长原创 2022-03-25 11:02:28 · 3005 阅读 · 0 评论