Spring中Model.ModelMap及ModelAndView之间的区别 1. Model(org.springframework.ui.Model)Model是一个接口,包含addAttribute方法,其实现类是ExtendedModelMap.ExtendedModelMap继承了ModelMap类,ModelMap类实现了Map接口. public class ExtendedModelMap extends ModelMap implements Model Model通过以…
目录 1.Model接口 2.ModelMap 3.ModelAndView 1.Model接口(org.springframework.ui.Model) Model是一个接口,包含addAttribute方法,其实现类是ExtendedModelMap. ExtendedModelMap继承了ModelMap类,ModelMap类实现了Map接口. public class ExtendedModelMap extends ModelMap implements Model Model通过以…