私のコントローラーには次の呼び出しがあります
@ModelAttribute("commandObject")
public UsersCommand getCommand(HttpServletRequest req) throws Exception {
...
return command;
}
@RequestMapping(value = {"addusers.json"}, method = RequestMethod.GET)
public void handleGet() {
//empty method
}
@RequestMapping(value = {"addusers.json"}, method = RequestMethod.POST)
public void handlePost(@ModelAttribute("commandObject") UsersCommand command, HttpServletRequest req) throws Exception {
//do stuff
}
取得中にUsersCommandオブジェクトのjsonを取得しますが、投稿を行った後、コマンドオブジェクトのjsonを取得しています。これは、火をつけて投稿を忘れたいので必要ありません。
投稿中にjsonオブジェクトがブラウザに表示されないようにするにはどうすればよいですか?