Class UserController

java.lang.Object
com.dada.banking_project.controllers.impl.UserController

@RestController @RequestMapping("/api") public class UserController extends Object
RESTful API for User management
  • Constructor Details

    • UserController

      public UserController()
  • Method Details

    • getUsers

      @GetMapping("/users") @ResponseStatus(OK) public List<User> getUsers()
      Get a list of all users
      Returns:
      list of all users
    • saveUser

      @PostMapping("/users") @ResponseStatus(CREATED) public void saveUser(@RequestBody User user)
      Save a new user
      Parameters:
      user - the user to be saved