@RequestMapping(value = "/update.action", method = RequestMethod.POST)public @ResponseBody Result<AppJobProduct> update(HttpServletRequest request,@RequestParam(value = "upload", required = false) MultipartFile file,@ModelAttribute AppJobProduct appJobProduct) {if(file!=null){String filename=new Date().getTime()+"."+StringUtils.substringAfterLast(file.getOriginalFilename(), ".");String path=request.getSession().getServletContext().getRealPath("product_image");File tFile=new File(path,filename);appJobProduct.setProductImageLink(/*request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+*/request.getContextPath()+"/product_image/"+filename);if(!tFile.exists()){tFile.mkdir();}try {file.transferTo(tFile);} catch (IllegalStateException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}return this.appJobProductService.update(appJobProduct);}