@RestController
@RequestMapping(path="/rest/users",
produces="application/json;charset=UTF-8")
public class UserRestController
extends Object
implements UserRestApiDocs
UserRepository Restful endpoints.| Constructor and Description |
|---|
UserRestController(UserRepository userRepository,
UserDTOAsm userDTOAsm) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<UserDTO> |
createUser(User user,
javax.servlet.http.HttpServletRequest request,
org.springframework.web.util.UriComponentsBuilder uriBuilder) |
org.springframework.http.ResponseEntity<Void> |
deleteUser(Long userId) |
org.springframework.http.ResponseEntity<UserDTO> |
getUserByEmail(String email) |
org.springframework.http.ResponseEntity<UserDTO> |
getUserById(Long userId) |
org.springframework.http.ResponseEntity<UserDTO> |
updateUser(Long userId,
User user,
javax.servlet.http.HttpServletRequest request) |
@Autowired public UserRestController(UserRepository userRepository, UserDTOAsm userDTOAsm)
@GetMapping(path="/{userId}")
public org.springframework.http.ResponseEntity<UserDTO> getUserById(@PathVariable
Long userId)
getUserById in interface UserRestApiDocs@GetMapping public org.springframework.http.ResponseEntity<UserDTO> getUserByEmail(@RequestParam @NotNull String email) throws UnsupportedEncodingException
getUserByEmail in interface UserRestApiDocsUnsupportedEncodingException@PostMapping public org.springframework.http.ResponseEntity<UserDTO> createUser(@RequestBody User user, javax.servlet.http.HttpServletRequest request, org.springframework.web.util.UriComponentsBuilder uriBuilder) throws URISyntaxException
createUser in interface UserRestApiDocsURISyntaxException@PutMapping(path="/{userId}")
public org.springframework.http.ResponseEntity<UserDTO> updateUser(@PathVariable
Long userId,
@RequestBody
User user,
javax.servlet.http.HttpServletRequest request)
throws URISyntaxException
updateUser in interface UserRestApiDocsURISyntaxException@DeleteMapping(path="/{userId}")
public org.springframework.http.ResponseEntity<Void> deleteUser(@PathVariable
Long userId)
deleteUser in interface UserRestApiDocs