@ModelAttribute("user") public User getUser() { User user = new User(); user.setUserId("1001"); user.setUserName("<>"); return user; }
@ModelAttribute("user2") public User getUser2() { User user = new User(); user.setUserId("1"); return user; }
@RequestMapping(value = "/handle61") public String handle61(@ModelAttribute("user") User user) { user.setUserId("1000"); return "/user/createSuccess"; }
@RequestMapping(value = "/handle51") public ResponseEntity<User> handle51(HttpEntity<User> requestEntity) { User user = requestEntity.getBody(); user.setUserId("1000"); return new ResponseEntity<User>(user, HttpStatus.OK); }