사용자 추가 api

This commit is contained in:
haerong22
2020-11-26 18:19:53 +09:00
parent 71481e070e
commit 2df8b99bfb

View File

@@ -1,8 +1,6 @@
package com.example.restfulwebservice.user;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -24,4 +22,9 @@ public class UserController {
return userDaoService.findOne(id);
}
@PostMapping("/users")
public void createUser(@RequestBody User user) {
User savedUser = userDaoService.save(user);
}
}