SpringMVC注解之@ModelAttribute
在 SpringMVC 的 Controller 中使用 @ModelAttribute 时,应用位置包括下面几种:
应用在方法上。
应用在方法的参数上。
应用在方法上,并且方法也使用了@RequestMapping
首先说明一下,被 @ModelAttribute 注解的方法会在Controller每个方法执行之前都执行,因此对于一个Controller中包含多个URL的时...
转载
2018-09-04 15:41:43 ·
136 阅读 ·
0 评论