Spring
redirect 경로에 관하여
deerfrd
2017. 4. 5. 16:15
반응형
redirect 경로가 헷갈렸었는데, 이번에 확실히 정리해봄
@RequestMapping(value = "/path1/path2", method = RequestMethod.GET) public String pathEx(HttpServletRequest request) throws Exception { return "redirect:path3"; } |
이런 코드가 있을때, redirect 경로는
1) (/)가 없을때 : "redirect:path3" => contextPath/path1/path3
2) (/)가 있을때 : "redirect:/path3" => contextPath/path3
반응형