0
@RequestMapping(value = {"/abc", "/def"} method = RequestMethod.GET)
public final String switch(HttpServletRequest request, ModelMap model)
throws Exception {
// pseudeocode:
if mapping == "abc"
return "redirect:/def";
else
process the request;
}
如果调用abc
处理函数,我想重定向到def
。如何在由同一个Spring MVC映射处理程序处理的两个请求映射之间切换?
是否有可能在处理“def”的相同处理函数中执行此操作?