SpringMVC: ModelAndView的addObject方法
addObject(String attributeName,Object attributeValue)
该方法相当于request.setAttribute,在页面上直接使用${attributeName}取值
如果方法的返回值是ModelAndView,在创建的html页面里,可以通过${attributeName},定位到attributeValue。
SpringMVC: ModelAndView的addObject方法
addObject(String attributeName,Object attributeValue)
该方法相当于request.setAttribute,在页面上直接使用${attributeName}取值
如果方法的返回值是ModelAndView,在创建的html页面里,可以通过${attributeName},定位到attributeValue。