model and modelMap (spring encapsulation), Java.util.Map
ModelMap(View) ModelAndView modelAndView = new ModelAndView(); modelAndView.addObject("name", "xxx"); modelAndView.setViewName("/user/index"); return modelAndView; //For the ModelAndView constructor, you can specify the name of the return page, or you can set the page that needs to be redirected through the setViewName method; call MODLE with ${name} on the front end:String retVal = "user/index"; User user = new User(); user.setName("XXX"); model.addAttribute("currentUser", user); return return retVal; //Add attributes through addAttribute(), (assuming that user has name attribute) call MapModelAndView mav = new ModelAndView(); User user1=new User();------Suppose that User has name attribute Map map=new HashMap();map.put("user",user1);//map.put is equivalent to request.setAttribute method mav.addObject(map);mav.setViewName("qweqas");return mav;;//Call in front-end user ${user.name}The above article on the EL expression value method of Model and ModelAndView in SpringMVC is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.