2
Cuál es mejor, devuelva "ModelAndView" o "String" en el controlador spring3
La forma de retorno ModelAndView @RequestMapping(value = "/list", method = RequestMethod.GET) public ModelAndView list( @UserAuth UserAuth user, ModelAndView mav) { if (!user.isAuthenticated()) { mav.setViewName("redirect:http://www.test.com/login.jsp"); return mav; } mav.setViewName("list"); mav.addObject("articles", listService.getLists()); return mav; } La forma de retorno String @RequestMapping(value = "/list", method = RequestMethod.GET) public String list( @UserAuth UserAuth user, …
115
spring-mvc
controller