@Test public void testLogout() throws Exception { mockMvc.perform(get("/login/doLogout")) .andExpect(status().isOk()) .andExpect(redirectedUrl("/index.jsp")); }
@RequestMapping("/doLogout") public String logout(HttpSession session) { session.removeAttribute(CommonConstant.USER_CONTEXT); return "forward:/index.jsp"; }
LoginController extends BaseController { @RequestMapping("/doLogout") public String logout(HttpSession session) { session.removeAttribute(CommonConstant.USER_CONTEXT); return "forward:/index.jsp"; } }
LoginController extends BaseController { @RequestMapping("/doLogout") public String logout(HttpSession session) { session.removeAttribute(CommonConstant.USER_CONTEXT); return "forward:/index.jsp"; }  }
LoginController extends BaseController { @RequestMapping("/doLogout") public String logout(HttpSession session) { session.removeAttribute(CommonConstant.USER_CONTEXT); return "forward:/index.jsp"; }  @RequestMapping("/doLogin") ModelAndView login(HttpServletRequest request, HttpServletResponse response); @RequestMapping("/doLogout") String logout(HttpSession session); }
LoginController extends BaseController { @RequestMapping("/doLogout") public String logout(HttpSession session) { session.removeAttribute(CommonConstant.USER_CONTEXT); return "forward:/index.jsp"; }  @RequestMapping("/doLogin") ModelAndView login(HttpServletRequest request, HttpServletResponse response); @RequestMapping("/doLogout") String logout(HttpSession session);  }