我想在每个用户会话中只调用一次Spring Controller的方法。
@RequestMapping(value = "/user.html")
public String getUser(Model model) {
doSomethingAtEachCall();
doSomethingOnlyOneTimePerSession(); // call only first time user access to this page
return "user";
}
我该怎么做(正确)?