![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
上传文件
csdnhyms
这个作者很懒,什么都没留下…
展开
-
springboot上传多个文件
springboot上传多个文件controller@PostMapping("/uploads") public String uploads(MultipartFile[] files, HttpServletRequest req){ String format = sdf.format(new Date()); String realPath = req.getServletContext().getRealPath("/img/")+ format;原创 2020-08-30 16:15:50 · 1024 阅读 · 0 评论 -
springboot上传单个文件
springboot上传文件springboot上传单个文件controller@RestControllerpublic class UploadController { SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); @PostMapping("/upload") public String upload(MultipartFile file, HttpServletRequest req){原创 2020-08-30 16:13:55 · 165 阅读 · 0 评论