私は次のコードを書きました:
@Controller
@RequestMapping("something")
public class somethingController {
@RequestMapping(value="/someUrl",method=RequestMethod.POST)
public String myFunc(HttpServletRequest request,HttpServletResponse response,Map model){
//do sume stuffs
return "redirect:/anotherUrl"; //gets redirected to the url '/anotherUrl'
}
@RequestMapping(value="/anotherUrl",method=RequestMethod.POST)
public String myAnotherFunc(HttpServletRequest request,HttpServletResponse response){
//do sume stuffs
return "someView";
}
}
リクエスト メソッドが POST である "anotherUrl" リクエスト マッピングにリダイレクトするにはどうすればよいですか?