public String editUserSumit(Model model, Integer id,@ModelAttribute("user") @Validated(value=(ValidationGroup1.class)) UserCustom userCustom, BindingResult bindingResult) throws Exception {}@ModelAttribute还可以将方法的返回值传到页面jsp页面:<select name="allName">						<c:forEach items="${names }" var="item">							<option value="${item.key }">${item.value }</option>						</c:forEach>				</select>Controller:@ModelAttribute("names")	public Map<String, String> userNames(){		Map<String, String> map = new HashMap<>();		map.put("1", "麦兜");		map.put("2", "奥特曼");		return map;	}3.使用最简单的方法 使用 model,可以不用@ModelAttributemodel.addAttribute("user", userCustom);4.简单类型的数据回显使用 model,不用@ModelAttributemodel.addAttribute("id", id);
新闻热点
疑难解答