我有一个接受表单发布的控制器 -
@Controller
public class RegistrationFormController extends SimpleFormController {
.....
.....
@RequestMapping(value="index", method=RequestMethod.POST)
protected ModelAndView onSubmit(@ModelAttribute Registration registration) throws Exception {
String uname=registration.getUsername();
.....
.......
ModelAndView mv = new ModelAndView("success");
.....
......
mv.addObject("addr",addr);
return mv;
}
即使我不扩展 SimpleFormController,Thsi 也能正常工作。
那么我可以通过扩展获得什么?