我有一个弹簧控制器类方法,如下所示
@RequestMapping(value = "/users", method = RequestMethod.POST)
public String saveOrUpdateUser(Pojotest pojotest,@ModelAttribute("userForm") User user,String s,
BindingResult result, Model model, final RedirectAttributes redirectAttributes)
我没有宣布Pojotest类@ModelAttribute,但仍然创建了一个默认对象,但它应该为null,因为它是一个普通的Pojo类。
任何人都可以帮我解决这个问题。