如需了解Thymeleaf基本表达式,请参考《Thymeleaf
th:action
定义后台控制器路径,类似
标签的action属性。例如:
...
th:each
对象遍历,功能类似jstl中的标签。
例如:
public classStudentRequestBean {private Liststudents;
...
}public class Student implementsSerializable{privateString firstName;privateString school;
...}
@RequestMapping(value= "/addStudent", method =RequestMethod.POST)public String addStudent(@ModelAttribute(value = "stuReqBean")
StudentRequestBean stuReqBean,ModelMap model) {...}
...