@Test public void testGetDefaultUser() { List<User> users = userClient.getUsers(bootstrapConfig.getDefaultUser().getUsername()); assertEquals(1, users.size()); assertEquals(bootstrapConfig.getDefaultUser().getUsername(), users.get(0).getUsername()); }
@RequestMapping(value = "/api/users", method = RequestMethod.GET) public List<User> getUsers(@RequestParam(value = "username", required = false) String username) { List<User> users = userRepository.findAll( where(ifParamNotNull(usernameEquals(username))) .and(enabledEquals(true)), Sort.by(Sort.Direction.ASC, "username")); return users; }
UserWS { @RequestMapping(value = "/api/users", method = RequestMethod.GET) public List<User> getUsers(@RequestParam(value = "username", required = false) String username) { List<User> users = userRepository.findAll( where(ifParamNotNull(usernameEquals(username))) .and(enabledEquals(true)), Sort.by(Sort.Direction.ASC, "username")); return users; } }
UserWS { @RequestMapping(value = "/api/users", method = RequestMethod.GET) public List<User> getUsers(@RequestParam(value = "username", required = false) String username) { List<User> users = userRepository.findAll( where(ifParamNotNull(usernameEquals(username))) .and(enabledEquals(true)), Sort.by(Sort.Direction.ASC, "username")); return users; }  }
UserWS { @RequestMapping(value = "/api/users", method = RequestMethod.GET) public List<User> getUsers(@RequestParam(value = "username", required = false) String username) { List<User> users = userRepository.findAll( where(ifParamNotNull(usernameEquals(username))) .and(enabledEquals(true)), Sort.by(Sort.Direction.ASC, "username")); return users; }  @RequestMapping(value = "/api/users", method = RequestMethod.GET) List<User> getUsers(@RequestParam(value = "username", required = false) String username); @RequestMapping(value = "api/users", method = RequestMethod.POST) ResponseEntity<User> createUser(@RequestBody User user); @RequestMapping(value = "/api/users/{userId}", method = RequestMethod.DELETE) void deleteUserByUserId(@PathVariable Long userId); @RequestMapping(value = "/api/users/{userId}", method = RequestMethod.PATCH) void updateUserByUserId(@PathVariable Long userId, @RequestBody User user); }
UserWS { @RequestMapping(value = "/api/users", method = RequestMethod.GET) public List<User> getUsers(@RequestParam(value = "username", required = false) String username) { List<User> users = userRepository.findAll( where(ifParamNotNull(usernameEquals(username))) .and(enabledEquals(true)), Sort.by(Sort.Direction.ASC, "username")); return users; }  @RequestMapping(value = "/api/users", method = RequestMethod.GET) List<User> getUsers(@RequestParam(value = "username", required = false) String username); @RequestMapping(value = "api/users", method = RequestMethod.POST) ResponseEntity<User> createUser(@RequestBody User user); @RequestMapping(value = "/api/users/{userId}", method = RequestMethod.DELETE) void deleteUserByUserId(@PathVariable Long userId); @RequestMapping(value = "/api/users/{userId}", method = RequestMethod.PATCH) void updateUserByUserId(@PathVariable Long userId, @RequestBody User user);  }