사용자 추가 api
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user