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