我在
Spring MVC(3.0)中有以下代码片段.
@RequestMapping(value="/add", method = RequestMethod.POST)
public String handleAddResourceGroup(@Valid ResourceGroup resourceGroup, BindingResult bindingResult, Model model) {
if (bindingResult.hasErrors()) {
model.addAttribute("flash.validationErrors", bindingResult.getAllErrors());
return "add";
}
//The rest of the code
}
如何在Freemarker中访问名为“flash.validationErrors”的model属性?
最佳答案 试试${.data_model [“flash.validationErrors”]}