📜  bean 名称 spring mvc 的 bindingresult 和普通目标对象都不是 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:17.600000             🧑  作者: Mango

代码示例1
// In the controller, you need to add the object as an attribute of the model:
    model.addAttribute("login", new Login());
// Like this:
@RequestMapping(value = "/", method = RequestMethod.GET) 
public String displayLogin(Model model) { 
    model.addAttribute("login", new Login()); 
    return "login"; 
}