2
Hangisi daha iyi, spring3 denetleyicide "ModelAndView" veya "String" i döndürün
ModelAndView'a dönüş yolu @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; } String dönüşünün yolu @RequestMapping(value = "/list", method = RequestMethod.GET) public String list( @UserAuth UserAuth user, Model model) { if …
115
spring-mvc
controller