modelAndView.setView("/fu/f_stuchangehotel");
modelAndView.setViewName("redirect:/fu/f_stuchangehotel");
	public ModelAndView addExcel(MultipartFile file, HttpServletRequest request, HttpServletResponse response) {		boolean result1 = false;		boolean	result2 = false;		ModelAndView modelAndView = new ModelAndView();		Teacher teacherInSession = (Teacher) request.getSession().getAttribute("teacher");		if(teacherInSession == null) {			modelAndView.setView("/fu/f_stuchangehotel");			return modelAndView;		}		String originalFilename = file.getOriginalFilename();	//获取原始的文件名		int i = originalFilename.lastIndexOf(".");		String suffix = originalFilename.substring(i);		//获取文件类型尾缀名		String savePath = request.getSession().getServletContext().getRealPath("//");	//获取存储的路径		String fileName = UploadFileUtils.getUniqueName()+suffix;	//生成唯一的文件名		String path = "UploadFile/"+fileName;		//相对于项目url的存储路径				/*构造Excel信息*/		ExcelInfo excelInfo = new ExcelInfo();		excelInfo.setSubmitTeacher(teacherInSession);		excelInfo.setName(originalFilename);		excelInfo.setStatus(0);		excelInfo.setPath(path);				/*保存上传的文件*/		File saveFile = new File(savePath+"//"+path);		try {			result1 = UploadFileUtils.saveFile(file.getInputStream(), saveFile);		} catch (IOException e) {			e.printStackTrace();		}		if(result1) {			result2 = excelInfoService.addExcel(excelInfo);		}		modelAndView.setView("/fu/f_stuchangehotel");		return modelAndView;	}