资 源 简 介
@RequestMapping(value="/upload",method=RequestMethod.POST)
public void fileUpload(@RequestParam("file")CommonsMultipartFile file,HttpServletRequest request
,HttpServletResponse response){ //图片文件上传
Map resMap = new HashMap();
String imageCode = "-1";//默认上传失败
/**判断文件是否为空,空直接返回上传错误**/
if(!file.isEmpty()){
//获得文件后缀名
String suffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
if(suff