Spring mvc 中model.addAttribute("student",student)请问这句是什么意思

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/21 02:11:25
Springmvc中model.addAttribute("student",student)请问这句是什么意思Springmvc中model.addAttribute("student",stude

Spring mvc 中model.addAttribute("student",student)请问这句是什么意思
Spring mvc 中model.addAttribute("student",student)请问这句是什么意思

Spring mvc 中model.addAttribute("student",student)请问这句是什么意思
按照spring一般的编码习惯,model 应该是contrller里面的Map结构吧.Map里面添加key=“student”,value=“student对象”的意思,最后把这个model返回一个jsp,在jsp页面上就能得到这个student对象了!