Package com.malay.shortyshoe.controller
Class UserController
java.lang.Object
com.malay.shortyshoe.controller.UserController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Customer>
createUser
(Customer user) org.springframework.http.ResponseEntity<Void>
deleteUser
(int id) getUserById
(int id) org.springframework.http.ResponseEntity<Customer>
updateUser
(int id, Customer updatedUser)
-
Constructor Details
-
UserController
public UserController()
-
-
Method Details
-
getAllUsers
@GetMapping("/") public org.springframework.http.ResponseEntity<List<Customer>> getAllUsers() throws BusinessException- Throws:
BusinessException
-
createUser
-
getUserById
@GetMapping("/{id}") public org.springframework.http.ResponseEntity<Optional<Customer>> getUserById(@PathVariable int id) throws BusinessException - Throws:
BusinessException
-
updateUser
@PutMapping("/{id}") public org.springframework.http.ResponseEntity<Customer> updateUser(@PathVariable int id, @RequestBody Customer updatedUser) throws BusinessException - Throws:
BusinessException
-
deleteUser
@DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<Void> deleteUser(@PathVariable int id)
-