@Param可以接收字符型的参数,multipart 类型该用啥注解?
spring 里是这么写来着。。。
··· java
@RequestMapping(value = "/import", method = RequestMethod.POST, produces = "text/plain;charset=UTF-8")
public @ResponseBody String uploadMultipleFileHandler(HttpServletResponse response,
@RequestParam("ExcelOpenFlags") int flag, @RequestParam("Password") String password,
@RequestPart("files[]") MultipartFile[] file) {
if (file == null || file.length == 0) {
logger.error("Choose the file please.");
return "Choose the file please.";
}
ExcelIOService service = new ExcelIOService();
return service.importExcel(flag, password, file[0]);
}