文件名称:SpringMVC批量上传
文件大小:3KB
文件格式:JAVA
更新时间:2021-05-09 12:11:57
java 批量上传
java 基于springMVC多图片上传,MySQL源码
@Controller
@RequestMapping("/upload")
public class UploadFileController {
@Autowired
private UploadFileService uploadFileService;
@RequestMapping("/upfile")
public String upload(HttpServletRequest request,
@RequestParam("designation") String designation,
@RequestParam("remark") String remark,
//@RequestParam("file") String file,
Model model)throws Exception {
String str = designation;
String[] st=str.split(","); //以逗号为分隔符进行截取
String re = remark;
String[] stre = re.split(",");
UploadFile uploadFile = new UploadFile();
//转成文件上传请求
MultipartHttpServletRequest murequest = (MultipartHttpServletRequest)request;
//在文件上传请求中获取文件,根据file的name
List